U
    f/e                     @   s.   d dl mZmZ d dlmZ G dd dZdS )    )	DataFrameSeriesNc                   @   s   e Zd Zdd Zdd ZdS )TestToFramec                 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   to_framer   valuesr   tmassert_frame_equal)selfZdatetime_seriesrsZxp r   M/tmp/pip-unpacked-wheel-tiezk1ph/pandas/tests/series/methods/test_to_frame.py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   $   s   r            Xr   )r   r   r   
isinstanceAssertionErrorr
   r   )r   r   Zserresultexpectedr   r   r   test_to_frame_expanddim   s    z#TestToFrame.test_to_frame_expanddimN)r   r   r   r   r!   r   r   r   r   r      s   r   )Zpandasr   r   Zpandas._testingZ_testingr
   r   r   r   r   r   <module>   s   