
    Owg                         d dl m Z mZ d dlZd dlZd dlmZ d dlm	Z	m
Z
 ej                  d        Z G d d      Z G d d      Zy)	    )datetime	timedeltaN)Index
RangeIndexc                  @    g d} t        | t        j                        S )N)               
                              l           dtype)r   npuint64)larges    _/var/www/horilla/myenv/lib/python3.12/site-packages/pandas/tests/indexes/numeric/test_setops.pyindex_larger      s     DEbii((    c                   8   e Zd Zej                  j                  dg d      d        Zd Zej                  j                  dddg      d        Zd Z	d	 Z
d
 Zd Zej                  j                  d eg dd      df eg dd      dfg      d        Zd Zy)
TestSetOpsr   )f8u8i8c           	         t        t        j                  d|      |      }|j                  |k(  sJ t        t	        d      D cg c]"  }t        j                         t        |      z   $ c}t              }|j                  |      }t        t        j                  ||f            }t        j                  ||       |j                  |      }t        t        j                  ||f            }t        j                  ||       y c c}w )N   r      )r   r   aranger   ranger   nowr   objectunionconcatenatetmassert_index_equal)selfr   indexiotherresultexpecteds          r   test_union_non_numericz!TestSetOps.test_union_non_numeric   s     bii/u={{e###eAhGx||~	!4GvVU#78
fh/U#78
fh/ Hs   'D	c           
      @   t        t        d      t        j                        }t        g d      }|j	                  |      }t        t        j
                  t        j                  |j                  |j                                    }t        j                  ||       |j	                  |      }t        t        j
                  t        j                  t        j                  |j                  |j                                          }t        j                  ||       y )Nr   r   )         r   r   )r   r   r   int64intersectionsortintersect1dvaluesr"   r#   asarrayr$   r%   r'   r(   r)   s        r   test_intersectionzTestSetOps.test_intersection'   s    eAhbhh/o&##E*ell!KLM
fh/##E*GGBJJr~~ellELLIJK
 	fh/r   r/   r   c                 2   t        g d|      }t        ddgt        j                        }t        g dt        j                        }|j                  |      }t	        j
                  ||       |j                  |      }t	        j
                  ||       y )N)r   r-   r.   r         ?      ?)        r8   r9          @g      @)r   r   float64r    r"   r#   )r$   r   r%   r'   r)   r(   s         r   test_int_float_union_dtypez%TestSetOps.test_int_float_union_dtype5   sq     iu-sCj

32"**EU#
fh/U#
fh/r   c                 .   t        dd      }t        ddgt        j                        }|j	                  |      }t        g dt        j                        }t        j                  ||       |j	                  |      }t        j                  ||       y )Nr   r.   startstopr8   r9   r   )r:   r8   r,   r9   r;   )r   r   r   r<   r    r"   r#   r5   s        r   test_range_float_union_dtypez'TestSetOps.test_range_float_union_dtypeB   so    +sCj

3U#0

C
fh/U#
fh/r   c                    t        dd      }t        ddgt        j                        }|j	                  |      }t        g dt
              }t        j                  ||       |j	                  |      }t        j                  ||       y )Nr   r.   r?   
   r   )r   r,   r-   rD   )r   r   r   r   r    r   r"   r#   r5   s        r   test_range_uint64_union_dtypez(TestSetOps.test_range_uint64_union_dtypeM   sj    +q"gRYY/U#f5
fh/U#
fh/r   c                     t        g d      }t        g d      }|j                  |      }t        j                  ||       |j                  |      }t        j                  ||       y )N)g      ?r-   r.   )123)r   
differencer"   r#   )r$   float_indexstring_indexr(   s       r   test_float64_index_differencez(TestSetOps.test_float64_index_differenceX   sV    K(_-''5
fk2((5
fl3r   c           
         t        g d      }|j                  |      }t        t        j                  t        j                  |j
                  |j
                                    }t        j                  ||       |j                  |      }t        t        j                  t        j                  t        j                  |j
                  |j
                                          }t        j                  ||       y )N)r   l           r	   r
   r   )	r   r0   r   r1   r2   r3   r"   r#   r4   )r$   r   r'   r(   r)   s        r   ,test_intersection_uint64_outside_int64_rangez7TestSetOps.test_intersection_uint64_outside_int64_rangec   s    LM))%00B0BELL!QRS
fh/##K0GGBJJr~~k.@.@%,,OPQ
 	fh/r   zindex2,keeps_name)r         r   r.   r%   nameTr'   Fc                     t        g dd      }t        g d      }|rd|_        |j                  ||      }||j                         }t	        j
                  ||       y )N)r   r.   r-   r   r,   r%   rR   )r   r.   r   r1   )r   rS   r0   sort_valuesr"   r#   )r$   index2
keeps_namer1   index1r)   r(   s          r   test_intersection_monotonicz&TestSetOps.test_intersection_monotonico   s\     W5##HM$$V$$7<++-H
fh/r   c                 b   t        g dd      }t        g d      }|j                  ||      }t        ddg      }|t        j                  ||       n$t        j                  ||j	                                |j
                  J ||j	                         }t        j                  ||       y )N)r   r-   r.   r   rY   rR   )r-   r.   r   r,   rU   r   r,   )r   symmetric_differencer"   r#   rV   rS   )r$   r1   rY   rW   r(   r)   s         r   test_symmetric_differencez$TestSetOps.test_symmetric_difference   s    |(3|$,,V$,?!Q=!!&(3!!&(*>*>*@A{{"""<++-H
fh/r   N)__name__
__module____qualname__pytestmarkparametrizer*   r6   r=   rB   rE   rM   rO   r   rZ   r]    r   r   r   r      s    [[W&890 :00 [[Ww&9:
0 ;
0	0	0	4
0 [[?148?159	

0
00r   r   c                       e Zd Zej                  j                  d ed       ed      g      d        Zej                  j                  d ed       ed      g      d        Zy)TestSetOpsSortslice_Nr   c                 
   t        g d      }||   }t        j                  |j                  |      |       t        j                  |j                  |      |       t        j                  |j                  |d      |       y )Nr,   r   r-   FrU   )r   r"   r#   r    )r$   rg   idxr'   s       r   test_union_sort_other_specialz,TestSetOpsSort.test_union_sort_other_special   sh     IF
cii.4
ekk#.4 	ciiEi:C@r   c                     t        g d      }||   }|j                  |d      }t        g d      }t        j                  ||       y )Nri   TrU   )r   r,   r-   )r   r    r"   r#   )r$   rg   rj   r'   r(   r)   s         r   test_union_sort_special_truez+TestSetOpsSort.test_union_sort_special_true   sA    IF5t,#
fh/r   )	r^   r_   r`   ra   rb   rc   slicerk   rm   rd   r   r   rf   rf      sh    [[XdU1X'>?
A @
A [[XdU1X'>?0 @0r   rf   )r   r   numpyr   ra   pandas._testing_testingr"   pandas.core.indexes.apir   r   fixturer   r   rf   rd   r   r   <module>rt      sI   
    ) )x0 x0v0 0r   