U
    sVc                     @   sL   d dl Zd dlZd dlm  mZ d dlmZ d dl	m
Z G dd dZdS )    N)	DataFramec                   @   sD   e Zd Zejdddgdd Zdd Zdd	 Ze	j
d
d ZdS )TestCopyattrindexcolumnsc                 C   s<   t ||}d |_| }dt ||_t ||jd ks8td S )NZfoo)getattrnamecopyAssertionError)selffloat_framer   indcp r   H/tmp/pip-unpacked-wheel-xj8nt62q/pandas/tests/frame/methods/test_copy.pytest_copy_index_name_checking   s
    
z&TestCopy.test_copy_index_name_checkingc                 C   s   t ddgi}dg|d< |d  |  d|d jd< t|t dgdgd dg|d< |d jd dksptt|t dgdgdgd d S )	Na   r   x)r   r   y)r   r   r   )r   r	   valuestmZassert_frame_equalr
   )r   dfr   r   r   test_copy_cache   s    

zTestCopy.test_copy_cachec                 C   s<   |  }|d |d< d|ks t|  }|j|jk	s8td S )NAE)r	   r
   _mgr)r   r   Zfloat_string_frameZcopr	   r   r   r   	test_copy'   s
    zTestCopy.test_copyc                 C   s   t tjjddddtjjddddd}tddD ]*}tjjdddd|jd d d| f< q4t|jjdkstt	|
 }t|jjd	kst	d S )
Nr   d   7   )size)r   b
   Zn_   r   )r   nprandomrandintrangeloclenr   blocksr
   r	   )r   r   iresultr   r   r   test_copy_consolidates0   s    (zTestCopy.test_copy_consolidatesN)__name__
__module____qualname__pytestmarkZparametrizer   r   r   tdZskip_array_manager_invalid_testr.   r   r   r   r   r   
   s   
		r   )Znumpyr%   r2   Zpandas.util._test_decoratorsutilZ_test_decoratorsr4   Zpandasr   Zpandas._testingZ_testingr   r   r   r   r   r   <module>   s
   