
    Mh"                     H    S r SSKrSSKJrJr  SSKJr   " S S\5      r	S r
g)z)
Tests involving custom Index subclasses
    N)	DataFrameIndexc                       \ rS rSrSS jrSrg)CustomIndex   Nc                     [        S U 5       5      (       a  [        S5      eUc  [        US5      (       a  UR                  n[        R
                  " USS9nU R                  X5      $ )Nc              3   B   #    U  H  n[        U[        5      v   M     g 7fN)
isinstancestr).0vals     T/var/www/html/env/lib/python3.13/site-packages/pandas/tests/indexes/test_subclass.py	<genexpr>&CustomIndex.__new__.<locals>.<genexpr>   s     4tz#s##ts   zCustomIndex cannot hold stringsnameOdtype)any	TypeErrorhasattrr   nparray_simple_new)clsdatar   s      r   __new__CustomIndex.__new__   sX    4t444=>><GD&1199DxxC(t**     r
   )__name__
__module____qualname____firstlineno__r   __static_attributes__r!   r    r   r   r      s    	+r    r   c            	      r   [        / SQ5      n U R                  SS5      n[        / SQ[        S9n[        R
                  " X5        [        [        R                  R                  S5      R                  S5      U [        SS/SS	9S
9nUR                  5       n[        R
                  " UR                  U5        g )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_indexr:      s     i
 CZZ8$F(7H&+	
		a 008QF*
B
 ^^F&..(3r    )__doc__numpyr   pandasr   r   pandas._testing_testingr0   r   r:   r!   r    r   <module>r@      s*     
+% 
+4r    