
    Owgz                     L    d dl Zd dlZd dlmZmZmZmZ d dlm	Z
  G d d      Zy)    N)CategoricalCategoricalIndexIndexIntervalc                   6    e Zd Zd Zd Zd Zd Zd Zd Zd Z	y)	TestReindexc                     d}t        g d      }t        j                  t        |      5  |j	                  ddg       d d d        y # 1 sw Y   y xY wN/cannot reindex on an axis with duplicate labelsabcr   matchr   r   r   pytestraises
ValueErrorreindexselfmsgcis      d/var/www/horilla/myenv/lib/python3.12/site-packages/pandas/tests/indexes/categorical/test_reindex.pytest_reindex_list_non_uniquez(TestReindex.test_reindex_list_non_unique   sE    ?23]]:S1 	#JJSz"	# 	# 	#s   AAc                     d}t        g d      }t        j                  t        |      5  |j	                  t        ddg             d d d        y # 1 sw Y   y xY wr
   r   r   r   r   r   r   r   s      r   #test_reindex_categorical_non_uniquez/TestReindex.test_reindex_categorical_non_unique   sJ    ?23]]:S1 	0JJ{C:./	0 	0 	0s   AAc                     d}t        g dg d      }t        j                  t        |      5  |j	                  ddg       d d d        y # 1 sw Y   y xY wNr   r   r   r   r   d
categoriesr   r   r   r   r   s      r   ,test_reindex_list_non_unique_unused_categoryz8TestReindex.test_reindex_list_non_unique_unused_category   sH    ?2?ST]]:S1 	#JJSz"	# 	# 	#s   AAc                     d}t        g dg d      }t        j                  t        |      5  |j	                  t        ddg             d d d        y # 1 sw Y   y xY wr!   r   r   s      r   3test_reindex_categorical_non_unique_unused_categoryz?TestReindex.test_reindex_categorical_non_unique_unused_category!   sM    ?2?ST]]:S1 	0JJ{C:./	0 	0 	0s   AAc                     t        g dg d      }|j                  g d      \  }}t        g d      }t        j                  ||d       t        j
                  |t        j                  g dt        j                               |j                  t        g dg d            \  }}t        g dg d      }t        j                  ||d       t        j
                  |t        j                  g dt        j                               y )	N)r   r   r   r"   r$   )r   r   r   Texact)r      r,   dtype)	r   r   r   tmassert_index_equalassert_numpy_array_equalnparrayintp)r   catresindexerexps        r   test_reindex_duplicate_targetz)TestReindex.test_reindex_duplicate_target'   s    ;OP{{?3WO$
c3d3
##GRXXirww-OP{{_9MN
W ;OP
c3d3
##GRXXirww-OP    c                    t        g       }|j                  ddg      \  }}t        j                  |t	        ddg      d       t        j
                  |t        j                  ddgt        j                               y )Nr   r   Tr*   r-   )	r   r   r/   r0   r   r1   r2   r3   r4   )r   r   r6   r7   s       r   test_reindex_empty_indexz$TestReindex.test_reindex_empty_index6   s`    R yy#s,W
c5#s#4DA
##GRXXr2hbgg-NOr:   c           
      ,   t        t        ddd      t        ddd      gd      }t        t        ddd      t        ddd      t        ddd      t        dd	d      gd      }|j                  |      \  }}|}t        j                  ||       y )
Nr      right)closedr,   T)ordered      )r   r   r   r/   r0   )r   r   ci_addresult_expecteds         r   'test_reindex_categorical_added_categoryz3TestReindex.test_reindex_categorical_added_category=   s    a7+Xa7-KL
 "Ag.Ag.Ag.Ag.	 
 JJv&	
h/r:   N)
__name__
__module____qualname__r   r   r&   r(   r9   r=   rI    r:   r   r   r      s'    #0#0QP0r:   r   )numpyr2   r   pandasr   r   r   r   pandas._testing_testingr/   r   rM   r:   r   <module>rR      s&       A0 A0r:   