
    JEf[
                     f   d dl Zd dlZd dlZd dlmZ d dlm	Z	  G d d      Z
ej                  j                  d ej                  g dd       ej                  dd       f ej                  g d	d
       ej                  d
d       f ej                  g de       ej                  ed       f ej                  g dd       ej                   d      f ej                  g d	d       ej                   d
      f ej                  g dd       ej                   e      fg      d        Zy)    N)SparseArrayc                       e Zd Zej                  j                  dddg      d        Zej                  j                  dddg      d        Zy)TestSparseArrayConcatkindintegerblockc                    t        g d|      }t        g d|      }t        j                  ||g      }t        j                  g dd      }t	        j
                  |j                  |       |j                  |k(  sJ y )N   r   r      r   r   r   r   r   r   r   r   r   r   int64dtyper   _concat_same_typenparraytmassert_numpy_array_equal	sp_valuesr   )selfr   abresultexpecteds         g/var/www/VTS_Report/venv/lib/python3.12/site-packages/pandas/tests/arrays/sparse/test_combine_concat.py
test_basicz TestSparseArrayConcat.test_basic
   sh    4040..1v6 88O7;
##F$4$4h?{{d"""    c                    |dk(  rdnd}t        g d|      }t        g d|      }t        j                  ||g      }t        j                  g dd      }t	        j
                  |j                  |       |j                  |k(  sJ y )	Nr   r   r
   r   r   r   r   r   r   )r   r   otherr   r   r   r   s          r   test_uses_first_kindz*TestSparseArrayConcat.test_uses_first_kind   ss    !W_	'4051..1v688O7;
##F$4$4h?{{d"""r!   N)__name__
__module____qualname__pytestmarkparametrizer    r$    r!   r   r   r   	   sT    [[Vi%9:
# ;
# [[Vi%9:# ;#r!   r   zother, expected_dtype)         r   r   )g      ?g      @g      @float64)r   r   ccategoryc                    t        j                  g dt        j                  dd            }t        j                  || gd      }t        j                  t	        |      t	        |       z         j                  |      }t        j                  ||       t        j                  | |gd      }t        j                  t	        |       t	        |      z         j                  |      }t        j                  ||       y )N)r   r   r   r   r   r   T)ignore_index)pdSeriesSparseDtypeconcatlistastyper   assert_series_equal)r#   expected_dtypes_sparser   r   s        r   test_concat_with_non_sparser=   #   s    & yy"..!*DEHYY%(t<Fyyh$u+56==nMH68,YYx(t<FyyetH~56==nMH68,r!   )numpyr   r(   pandasr4   pandas._testing_testingr   pandas.core.arrays.sparser   r   r)   r*   r5   r6   objectr   r=   r+   r!   r   <module>rD      s       1# #4  
9G	,nbnnWa.HI 
?)	4nbnnYPQ6RS	?&	1>2>>&!3LM	9J	/'1BC	?*	5xrxx	7JK	?*	5xrxx7GH"
-#"
-r!   