U
    >vfM                     @   s6   d dl Zd dlmZmZ d dlmZ G dd dZdS )    N)	DataFrame
date_rangec                   @   s$   e Zd Zdd Zdd Zdd ZdS )
TestEqualsc                 C   sB   t ddgddgd}t ddgddgd}||dks>td S )N      sd)abF)r   equalsAssertionError)selfdf1df2 r   J/tmp/pip-unpacked-wheel-vdrwu74i/pandas/tests/frame/methods/test_equals.pytest_dataframe_not_equal   s    z#TestEquals.test_dataframe_not_equalc                 C   s~   t ddgddgddgd}| dd	d
g }|sR|jjd j|jjd jksRtt|| ||slt||sztd S )Nxyr   r   wz)ABCr   r   r   r   )	r   Zreset_indexZ_mgrblocksZdtyper   tmZassert_frame_equalr   )r   Zusing_array_managerZdf0r   r   r   r   test_equals_different_blocks   s     z'TestEquals.test_equals_different_blocksc                 C   sV  t jd}tt jd|dgd}d |d< tdddd|d	< tddd
d|d< |d |d	  |d< t dd dkt|d< t j|j	d d d< |
 }|d |d st|d	 |d	 st|d |d st|d |d st|d |d st||st|tr.t|
 }|d d|d< ||rXt| }||}||rxt|
 }|jd d d |_||rttdddd}||}|
 }||st|jdgdd}|jdgdd}||st|jdgdd}||r"t|jdgdd}|jdgdd}||sRtd S )N
   Zfloats)indexcolumnsz0the sky is so blue. we could use more chocolate.textz2000-1-1T)ZperiodsfreqstartDendZdiff   r   boolr   Zfloat32T)append)nprandomr   splitr   ZarangeZastypeobjectnanloccopyr   r   Z	set_indexr   )r   r   r   r   Z	differentZdifferent_indexZdf3r   r   r   test_equals   sJ    

zTestEquals.test_equalsN)__name__
__module____qualname__r   r   r1   r   r   r   r   r   
   s   r   )	Znumpyr*   Zpandasr   r   Zpandas._testingZ_testingr   r   r   r   r   r   <module>   s   