3
Êb_4  ã               @   s   d dl jZG dd„ dƒZdS )é    Nc               @   s,   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	S )
ÚTestSeriesSubclassingc             C   s®   t jddddgtdƒd�}|jddg }t jddgtd	ƒd�}t j||ƒ |jddg }t jddgtd
ƒd�}t j||ƒ |jddg }t jddgtd	ƒd�}t j||ƒ d S )Né   é   é   é   Úabcd)ÚindexÚaÚbÚabZcd)ÚtmÚSubclassedSeriesÚlistÚlocZassert_series_equalZiloc)ÚselfÚsÚresÚexp© r   úC/tmp/pip-build-jkwsxyiy/pandas/pandas/tests/series/test_subclass.pyÚtest_indexing_sliced   s    z*TestSeriesSubclassing.test_indexing_slicedc             C   sR   t jddddgtdƒdd�}|jƒ }t jdddddgitdƒd�}t j||ƒ d S )	Nr   r   r   r   r   Zxxx)r   Úname)r   )r   r   r   Zto_frameÚSubclassedDataFrameÚassert_frame_equal)r   r   r   r   r   r   r   Útest_to_frame   s    z#TestSeriesSubclassing.test_to_framec             C   sZ   t jddddgtdƒtdƒgd�}|jƒ }t jddgddgdœd	d
gd�}t j||ƒ d S )Nr   r   r   r   ZaabbZxyxy)r   )ÚxÚyr	   r
   )r   r   r   Zunstackr   r   )r   r   r   r   r   r   r   Útest_subclass_unstack   s    " z+TestSeriesSubclassing.test_subclass_unstackc          
   C   s6   t jtdd�� t jƒ }W d Q R X dt|ƒks2t‚d S )NF)Zcheck_stacklevelr   )r   Zassert_produces_warningÚDeprecationWarningr   ÚreprÚAssertionError)r   Z
sub_seriesr   r   r   Útest_subclass_empty_repr"   s    z.TestSeriesSubclassing.test_subclass_empty_reprN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r!   r   r   r   r   r      s   	r   )Zpandas._testingZ_testingr   r   r   r   r   r   Ú<module>   s   
