U
    饡c                     @   s  d dl Z d dlmZ d dlmZ dddddd	d
dddddddddddddddddddddgZededd d d d d d d!edd d d edd d d d d d d d!d d edd d edd"Zzd dlZd!ed< W n ek
r   Y nX zd dl	Z	d!ed	< W n ek
r   Y nX zd dl
Zd!ed
< W n ek
r>   Y nX zd dlZd!ed< W n ek
rj   Y nX zd dlZd!ed< W n ek
r   Y nX zd dlZd!ed< W n ek
r   d!ed< Y nX zd dlZd!ed< W n ek
r   Y nX zd dlZd!ed< W n ek
r"   Y nX zd dlZd!ed< W n ek
rN   Y nX zd dlZd!ed< W n ek
rz   Y nX zd dlZd!ed< W n ek
r   Y nX zd d#lmZ d!ed< W n ek
r   Y nX zd d$lmZ d!ed< W n ek
r   Y nX zd d%lmZ d!ed< W n ek
r6   Y nX zd dlZd!ed< W n ek
rb   Y nX d&d' Ze jd!d(d)d* Ze jd!d(d+d, ZdS )-    N)Codec)fsbrotlibz2cythondataset
hypothesisfastparquetgandivagcsgdbgziphdfslarge_memorylz4memory_leaknopandasorcpandasparquetparquet_encryptionplasmas3snappy	substrait
tensorflowflightslowrequires_testing_datazstdFT)r   r   r   r   r	   r   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )GcsFileSystemS3FileSystem)HadoopFileSystemc                 C   s
  |j jrdt| krdS ddddddg}|D ]$}d	|t| kr,t| s, dS q,d
t| krjtd sjdS dt| krzdd l}W dS  tk
r   Y dS X dt| krzddlm} W dS  tk
r   Y dS X t	|j ddrdt| k rdS dt| krdS dS )Nz/pyarrow/tests/Tr   r   r   r   r   r   z
pyarrow/{}zpyarrow/parquet/encryptionr   zpyarrow/cudar   Fz
pyarrow/fsr!   doctest_cythonz/pyarrow/_parquet_encryption)
optiondoctestmodulesstrformatdefaultsZpyarrow.cudaImportError
pyarrow.fsr"   getattr)pathconfigZdoctest_groupsgrouppyarrowr"    r1   4/tmp/pip-unpacked-wheel-qoi2rb4q/pyarrow/conftest.pypytest_ignore_collect   sF    
r3   )Zautousec              	   c   sR   | j jj}t| j jdd}|s"|rH| d}|  d V  W 5 Q R X nd V  d S )Nr$   Ftmpdir)r.   r%   r&   r,   ZgetfixturevalueZas_cwd)request	doctest_m	doctest_cr4   r1   r1   r2   _docdir   s    


r8   c              	   c   s   |j jj}t|j jdd}|s"|r~t| d< t }|d }|t|}|d W 5 Q R X || d< t|| d< t|| d< d V  d S )	Nr$   Fr   zpyarrow-fs-example.dats   datalocal
local_pathr-   )	r.   r%   r&   r,   r   ZLocalFileSystemZopen_output_streamr'   write)Zdoctest_namespacer5   Ztmp_pathr6   r7   r9   r-   streamr1   r1   r2   add_fs   s    
r=   )Zpytestr0   r   r   groupsZis_availabler)   r   r*   r	   Zpyarrow.gandivaZpyarrow.datasetZpyarrow.orcr   Zpyarrow.parquetZpyarrow.parquet.encryptionZpyarrow.plasmar   Zpyarrow.flightr+   r    r"   r#   Zpyarrow.substraitr3   Zfixturer8   r=   r1   r1   r1   r2   <module>   s   1


