o
    iT                     @   sx   d dl Zd dlZd dlm  mZ d dlZd dlm	Z	 d dl
mZ ejdd Zejdd Zejjejdd	 ZdS )
    N)	DataFrame)	get_arrayc                 C   s  t g dg dd}g d|d< |d d  }|jjd ur(tdd |jjD s*J |  |jjd d us8J tt|d	t|d	sFJ |jjd
 d u sPJ |jdsXJ |jd
r`J |jdshJ | rd|j	d< |jd
swJ |j
d dksJ d S d S )N         皙?g?g333333?ab)         cc                 s   s    | ]}|d uV  qd S )N ).0refr   r   `/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/pandas/tests/copy_view/test_internals.py	<genexpr>   s    
z#test_consolidate.<locals>.<genexpr>r   r   r   r   g        )r   r   )r   r   r	   )r   _mgrrefsall_consolidate_inplacenpshares_memoryr   _has_no_referenceiloclocusing_copy_on_writedfsubsetr   r   r   test_consolidate   s&   
r#   c                 C   st   | st d tg dg dd}|d d  }|jjd us J d|d< |jjd us,J d|d< |jjd u s8J d S )Nz+test only relevant when using copy-on-writer   r   r
   r   r   r   )pytestskipr   r   parentr   r   r   r   test_clear_parent2   s   
r'   c                  C   s   t ddp tg dg dd} | d d  }d|jd< | jd dks&J dt jj_tg dg dd} | d d  }d|jd< | jd d	ksJJ dt jj_tg dg dd} | d d  }d|jd< | jd dksnJ W d    d S 1 syw   Y  d S )
Nzmode.copy_on_writeFr   r   r
   r   )r   r   Tr   )pdoption_contextr   r   optionsmodecopy_on_write)r!   r"   r   r   r   test_switch_optionsD   s    




"r-   )numpyr   r$   pandas.util._test_decoratorsutil_test_decoratorstdpandasr(   r   pandas.tests.copy_view.utilr   skip_array_manager_invalid_testr#   r'   mark
single_cpur-   r   r   r   r   <module>   s    
&
