
    bMh"                     P    d Z ddlZddlmZmZ ddlmZ  G d de          Z	d Z
dS )z)
Tests involving custom Index subclasses
    N)	DataFrameIndexc                       e Zd ZddZdS )CustomIndexNc                     t          d |D                       rt          d          |t          |d          r|j        }t	          j        |d          }|                     ||          S )Nc              3   @   K   | ]}t          |t                    V  d S N)
isinstancestr).0vals     b/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/pandas/tests/indexes/test_subclass.py	<genexpr>z&CustomIndex.__new__.<locals>.<genexpr>   s,      44z#s##444444    zCustomIndex cannot hold stringsnameOdtype)any	TypeErrorhasattrr   nparray_simple_new)clsdatar   s      r   __new__zCustomIndex.__new__   sr    44t44444 	?=>>><GD&11<9DxC(((tT***r   r	   )__name__
__module____qualname__r    r   r   r   r      s(        	+ 	+ 	+ 	+ 	+ 	+r   r   c                     t          g d          } |                     dd          }t          g dt                    }t	          j        ||           t          t          j        	                    d          
                    d          | t          ddgd	          
          }|                                }t	          j        |j        |           d S )N)         r   string)r&   r#   r$   r%   r   r$   )r$   r%   r#   )r   )columnsindex)r   insertr   objecttmassert_index_equalr   r   randomdefault_rngstandard_normalreset_indexr'   )idxresultexpecteddfs       r   "test_insert_fallback_to_base_indexr5      s     iii
 
 CZZ8$$F(((777H&(+++	
	a  0088QF***
 
 
B
 ^^F&.(33333r   )__doc__numpyr   pandasr   r   pandas._testing_testingr+   r   r5   r!   r   r   <module>r;      s                     
+ 
+ 
+ 
+ 
+% 
+ 
+ 
+4 4 4 4 4r   