U
    k/e                     @   sh   d dl Z d dlZd dlZd dlm  mZ zd dl	Z
W n ek
rJ   Y nX e jje jj	dd ZdS )    Nc                     sD   t tddd tdD d  fdd} tj| ddd	 d S )
Ni'  c                 S   s   g | ]}t d qS )   )	test_utilZrands).0_ r   H/tmp/pip-unpacked-wheel-seu8352k/pyarrow/tests/test_adhoc_memory_leak.py
<listcomp>#   s     z6test_deserialize_pandas_arrow_7956.<locals>.<listcomp>)abc                     s*   t j  } t | }t j| d S )N)paZipcZserialize_pandasZ
to_pybytesZ	py_bufferZdeserialize_pandas)Zdf_bytesbufZdfr   r   action%   s    
z2test_deserialize_pandas_arrow_7956.<locals>.actioni   d   )	thresholdZ
iterations)pdZ	DataFramenpZarangeranger   Zmemory_leak_check)r   r   r   r   "test_deserialize_pandas_arrow_7956   s
    r   )ZpytestZnumpyr   Zpyarrowr   Zpyarrow.tests.utiltestsutilr   Zpandasr   ImportErrormarkZmemory_leakr   r   r   r   r   <module>   s   