o
    \i6                     @   sD  d Z ddlZddlZddlZddlZddlmZ ddlmZm	Z	 zddl
Z
W n ey1   dZ
Y nw eedZedo@e  Zz
ddlZdd ZW n eyZ   d	d ZdZY nw zdd
lmZ dd Zdd ZW n ey|   dd Zd ZZY nw e	edu ddZe	ejd ddZe	e
du ddZe	e
duddZdS )z
Small utilities for testing.
    N)mp)SkipTestskipifpypy_version_infoPy_GIL_DISABLEDc                 C      | S )*A decorator to skip tests requiring numpy. funcr	   r	   s/var/www/www-root/data/www/176.119.141.140/sports-predictor/venv/lib/python3.10/site-packages/joblib/test/common.py
with_numpy      r   c                 C      dd }|S )r   c                   S      t d)NzTest requires numpyr   r	   r	   r	   r   my_func%      zwith_numpy.<locals>.my_funcr	   )r   r   r	   r	   r   r   "      )memory_usagec                 C   r   )4A decorator to skip tests requiring memory_profiler.r	   r
   r	   r	   r   with_memory_profiler3   r   r   c                 O   s*   t   t| ||fdd}t|t| S )z)Compute memory usage when executing func.gMbP?)interval)gccollectr   maxmin)r   argskwargsmem_user	   r	   r   memory_used7   s   r    c                 C   r   )r   c                   S   r   )NzTest requires memory_profiler.r   r	   r	   r	   r   
dummy_funcB   r   z(with_memory_profiler.<locals>.dummy_funcr	   )r   r!   r	   r	   r   r   ?   r   zNeeds multiprocessing to run.)reasonz/dev/shmz5This test requires a large /dev/shm shared memory fs.zNeeds lz4 compression to runz$Needs lz4 not being installed to run)__doc__r   ossys	sysconfigjoblib._multiprocessing_helpersr   joblib.testingr   r   lz4ImportErrorhasattrIS_PYPYget_config_var_is_gil_enabledIS_GIL_DISABLEDnumpynpr   memory_profilerr   r   r    with_multiprocessingpathexistswith_dev_shmwith_lz4without_lz4r	   r	   r	   r   <module>   sJ    
