o
    Û­jQ  ã                   @   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                   @   sJ   e Zd Zej dddg¡dd„ ƒZej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 u sJ ‚d S )NÚfoo)ÚgetattrÚnameÚcopy)ÚselfÚfloat_framer   ÚindÚcp© r   úa/var/www/html/CropPilot/venv/lib/python3.10/site-packages/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s8J ‚t |t dgdgdgdœƒ¡ d S )	NÚaé   r   Úxéÿÿÿÿ)r   r   Úy)r   r   r   )r   r
   ÚvaluesÚtmÚassert_frame_equal)r   Údfr   r   r   Útest_copy_cache   s   

"zTestCopy.test_copy_cachec                 C   s<   |  ¡ }|d |d< d|vsJ ‚|  ¡ }|j|jusJ ‚d S )NÚAÚE)r
   Ú_mgr)r   r   Úfloat_string_frameÚcopr
   r   r   r   Ú	test_copy(   s
   zTestCopy.test_copyc                 C   s¤   t tj d¡jdddd�tj d¡jdddd�dœƒ}tdƒD ]}tj d¡jdddd�|jd d …d|› �f< qt|jj	ƒd	ksBJ ‚| 
¡ }t|jj	ƒd
ksPJ ‚d S )Né   r   éd   é7   )Úsize)r   Úbé
   Ún_é   r   )r   ÚnpÚrandomÚdefault_rngÚintegersÚrangeÚlocÚlenr   Úblocksr
   )r   r   ÚiÚresultr   r   r   Útest_copy_consolidates1   s   þÿ.zTestCopy.test_copy_consolidatesN)Ú__name__Ú
__module__Ú__qualname__ÚpytestÚmarkÚparametrizer   ÚtdÚskip_copy_on_write_invalid_testr   r!   Úskip_array_manager_invalid_testr4   r   r   r   r   r   
   s    
	
	r   )Únumpyr*   r8   Úpandas.util._test_decoratorsÚutilÚ_test_decoratorsr;   Úpandasr   Úpandas._testingÚ_testingr   r   r   r   r   r   Ú<module>   s    