B
    lnd                 @   s  d dl Z 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gZd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eddedd!Zyd dlZd ed< W n e	k
r   Y nX yd dl
Z
d ed
< W n e	k
r   Y nX yd dlZd ed< W n e	k
rB   Y nX yd dlZd ed< W n e	k
rn   Y nX yd dlZd ed< W n e	k
r   Y nX yd dlZd ed< W n e	k
r   Y nX yd dlZd ed< W n e	k
r   d ed< Y nX yd dlZd ed< W n e	k
r&   Y nX yd dlZd ed< W n e	k
rR   Y nX yd dlZd ed< W n e	k
r~   Y nX yd d"lmZ d ed< W n e	k
r   Y nX yd d#lmZ d ed< W n e	k
r   Y nX yd d$lmZ d ed< W n e	k
r   Y nX yd dlZd ed< W n e	k
r:   Y nX d%d& Ze jd d'd(d) Ze jd d'd*d+ Ze jd,d-d.d/ ZdS )0    N)Codec)fsacerobrotlibz2cythondataset
hypothesisfastparquetgandivagcsgdbgziphdfslarge_memorylz4memory_leaknopandasorcpandasparquetparquet_encryptions3snappy	substrait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   )GcsFileSystem)S3FileSystem)HadoopFileSystemc             C   s   |j jrdt| krdS dddddg}x*|D ]"}d|t| kr,t| s,dS q,W d	t| krjtd
 sjdS dt| krydd l}dS  tk
r   dS X dt| kryddlm} dS  tk
r   dS X t	|j dd rdt| krdS dt| k rdS dS )Nz/pyarrow/tests/Tr   r   r   r   r   z
pyarrow/{}zpyarrow/parquet/encryptionr   zpyarrow/cudar   Fz
pyarrow/fs)r    doctest_cythonz/pyarrow/_parquet_encryption)
optiondoctestmodulesstrformatdefaultsZpyarrow.cudaImportError
pyarrow.fsr    getattr)pathconfigZdoctest_groupsgrouppyarrowr     r/   4/tmp/pip-unpacked-wheel-i2z0tf32/pyarrow/conftest.pypytest_ignore_collect   sB    
r1   )Zautousec          	   c   sR   | j jj}t| j jdd}|s"|rH| d}|  d V  W d Q R X nd V  d S )Nr"   Ftmpdir)r,   r#   r$   r*   ZgetfixturevalueZas_cwd)request	doctest_m	doctest_cr2   r/   r/   r0   _docdir   s    


r6   c          	   c   s   |j jj}t|j jdd}|s"|r~t| d< t }|d }|t|}|d W d 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_namespacer3   Ztmp_pathr4   r5   r7   r+   streamr/   r/   r0   add_fs   s    
r;   session)scopec                 sL   ddl m   fdd} d}ddd} | ||d	t it  | |fS )
z+
    Register a unary scalar function.
    r   )computec                s    j d|dg| jdS )Nadd   )memory_pool)call_functionrA   )ctxx)pcr/   r0   unary_function  s    z*unary_func_fixture.<locals>.unary_functionzy=x+1zadd functionztest add function)summarydescriptionarray)r.   r>   Zregister_scalar_functionpaZint64)rF   	func_nameZ	unary_docr/   )rE   r0   unary_func_fixture  s    

rL   )Zpytestr.   rJ   r   r   groupsZis_availabler'   r   r(   r
   Zpyarrow.gandivaZpyarrow.aceroZpyarrow.datasetZpyarrow.orcr   Zpyarrow.parquetZpyarrow.parquet.encryptionZpyarrow.flightr)   r   r    r!   Zpyarrow.substraitr1   Zfixturer6   r;   rL   r/   r/   r/   r0   <module>   s  0