U
    MZf:                     @   s2   d dl mZmZmZ d dlmZ G dd dZdS )    )	DataFrameIndexSeriesNc                   @   s$   e Zd Zdd Zdd Zdd ZdS )TestToFramec                 C   sb   t td}|d }td gtd}t|j| |dd }td gtd}t|j| d S )N   )ZdtypeZfoo)	r   rangeto_framer   objecttmZassert_index_equalcolumnsrename)selfserresultZ	exp_index r   M/tmp/pip-unpacked-wheel-nbcvw55c/pandas/tests/series/methods/test_to_frame.py test_to_frame_respects_name_none
   s    
z,TestToFrame.test_to_frame_respects_name_nonec                 C   s   d |_ | }t|j|jd}t|| d|_ | }td|ji|jd}t|| |jdd}td|ji|jd}t|| d S )N)indexZtestnameZtestdifferentname)r   r   r   valuesr   r
   assert_frame_equal)r   Zdatetime_seriesrsZxpr   r   r   test_to_frame   s"      zTestToFrame.test_to_framec                    sn   G  fdddt }G dd dt |dddgdd	}| }t| sLt ddddgi}t|| d S )
Nc                       s   e Zd Ze fddZdS )z=TestToFrame.test_to_frame_expanddim.<locals>.SubclassedSeriesc                    s    S )Nr   )r   SubclassedFramer   r   _constructor_expanddim/   s    zTTestToFrame.test_to_frame_expanddim.<locals>.SubclassedSeries._constructor_expanddimN)__name__
__module____qualname__propertyr   r   r   r   r   SubclassedSeries.   s   r!   c                   @   s   e Zd ZdS )z<TestToFrame.test_to_frame_expanddim.<locals>.SubclassedFrameN)r   r   r   r   r   r   r   r   3   s   r         r   Xr   )r   r   r   
isinstanceAssertionErrorr
   r   )r   r!   r   r   expectedr   r   r   test_to_frame_expanddim+   s    z#TestToFrame.test_to_frame_expanddimN)r   r   r   r   r   r(   r   r   r   r   r   	   s   r   )Zpandasr   r   r   Zpandas._testingZ_testingr
   r   r   r   r   r   <module>   s   