a
    Pf                     @   s   d dl mZ d dlmZ d dlZd dlZd dlZd dlmZ e	dZ
de
j_de
j_de
j_dd Zedeeddf dddZdd ZdS )    )	Generator)contextmanagerN)HDFStoretables   c                 C   s,   z| d ur|    W n ty&   Y n0 d S )N)closeOSError)store r
   X/var/www/ai-form-bot/venv/lib/python3.9/site-packages/pandas/tests/io/pytables/common.py
safe_close   s
    r   aF)returnc              	   c   sp   t  T}t|| }t|||||d}|V  W d    n1 sD0    Y  W d    n1 sb0    Y  d S )N)mode	complevelcomplib
fletcher32)tempfileTemporaryDirectorypathlibPathr   )pathr   r   r   r   Z
tmpdirnameZtmp_pathr	   r
   r
   r   ensure_clean_store   s    
r   c              	   C   s*   z|  | W n ttfy$   Y n0 dS )z
    For tests using tables, try removing the table to be sure there is
    no content from previous tests using the same table name.
    N)remove
ValueErrorKeyError)r	   keyr
   r
   r   _maybe_remove*   s    r   )r   NNF)collections.abcr   
contextlibr   r   r   ZpytestZpandas.io.pytablesr   Zimportorskipr   
parametersZMAX_NUMEXPR_THREADSZMAX_BLOSC_THREADSZMAX_THREADSr   r   r   r
   r
   r
   r   <module>   s    
	 