U
    c[
                     @   s  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 dZ
ejdejdddgd	d
ed	d fejdddgdd
edd fejdddged
eed fejdddgdd
ed	fejdddgdd
edfejdddgdd
eefgdd ZdS )    N)SparseArrayc                   @   s@   e Zd Zejdddgdd Zejdddgdd ZdS )	TestSparseArrayConcatkindintegerblockc                 C   sn   t ddddg|d}t ddddg|d}t ||g}tjdddddgdd}t|j| |j|ksjtd S )N   r      r   int64dtype	r   Z_concat_same_typenparraytmZassert_numpy_array_equalZ	sp_valuesr   AssertionError)selfr   abresultexpected r   R/tmp/pip-unpacked-wheel-g7fro6k3/pandas/tests/arrays/sparse/test_combine_concat.py
test_basic
   s    z TestSparseArrayConcat.test_basicc                 C   s~   |dkrdnd}t ddddg|d}t ddddg|d}t ||g}tjdddddgdd}t|j| |j|ksztd S )	Nr   r   r   r   r   r	   r
   r   r   )r   r   otherr   r   r   r   r   r   r   test_uses_first_kind   s    z*TestSparseArrayConcat.test_uses_first_kindN)__name__
__module____qualname__pytestmarkparametrizer   r   r   r   r   r   r   	   s   
r   zother, expected_dtype         r
   r   g      ?g      @g      @Zfloat64r   r   ccategoryc                 C   s   t jdddgt ddd}t j|| gdd}t t|t|  |}t|| t j| |gdd}t t| t| |}t|| d S )Nr   r   r   r
   r   T)Zignore_index)pdSeriesSparseDtypeconcatlistZastyper   Zassert_series_equal)r   Zexpected_dtypeZs_sparser   r   r   r   r   test_concat_with_non_sparse#   s    r,   )Znumpyr   r   Zpandasr'   Zpandas._testingZ_testingr   Zpandas.core.arrays.sparser   r   r    r!   r(   r)   objectr   r,   r   r   r   r   <module>   s    