a
    PªfQ  ã                   @   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 s8J ‚d S )NZfoo)ÚgetattrÚnameÚcopy)ÚselfÚfloat_framer   ÚindÚcp© r   ú]/var/www/ai-form-bot/venv/lib/python3.9/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spJ ‚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_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s8J ‚d S )NÚAÚE)r	   Ú_mgr)r
   r   Z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 ]0}tj d¡jdddd|jd d …d|› f< q>t|jj	ƒd	ks„J ‚| 
¡ }t|jj	ƒd
ks J ‚d S )Né   r   éd   é7   )Úsize)r   Úbé
   Zn_é   r   )r   ÚnpÚrandomZdefault_rngZintegersÚrangeÚlocÚlenr   Úblocksr	   )r
   r   ÚiÚresultr   r   r   Útest_copy_consolidates1   s    þÿ.zTestCopy.test_copy_consolidatesN)Ú__name__Ú
__module__Ú__qualname__ÚpytestÚmarkZparametrizer   ÚtdZskip_copy_on_write_invalid_testr   r   Zskip_array_manager_invalid_testr.   r   r   r   r   r   
   s   
	
	r   )Únumpyr&   r2   Zpandas.util._test_decoratorsÚutilZ_test_decoratorsr4   Zpandasr   Zpandas._testingZ_testingr   r   r   r   r   r   Ú<module>   s
   