
    .Ph6                        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	 	 ddl
Z
n# e$ r dZ
Y nw xY w eed          Z ej        d          o ej                     Z	 ddlZd Zn# e$ r d ZdZY nw xY w	 dd	lmZ d
 Zd Zn# e$ r
 d ZdxZZY nw xY w e	edu d          Z e	ej                            d           d          Z e	e
du d          Z e	e
dud          ZdS )z
Small utilities for testing.
    N)mp)SkipTestskipifpypy_version_infoPy_GIL_DISABLEDc                     | S )*A decorator to skip tests requiring numpy. funcs    R/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/joblib/test/common.py
with_numpyr              c                     d }|S )r	   c                       t          d          )NzTest requires numpyr   r
   r   r   my_funczwith_numpy.<locals>.my_func%   s    0111r   r
   )r   r   s     r   r   r   "   s    	2 	2 	2 r   )memory_usagec                     | S )4A decorator to skip tests requiring memory_profiler.r
   r   s    r   with_memory_profilerr   3   r   r   c                     t          j                     t          | ||fd          }t          |          t	          |          z
  S )z)Compute memory usage when executing func.gMbP?)interval)gccollectr   maxmin)r   argskwargsmem_uses       r   memory_usedr"   7   s=    

dF3eDDD7||c'll**r   c                     d }|S )r   c                       t          d          )NzTest requires memory_profiler.r   r
   r   r   
dummy_funcz(with_memory_profiler.<locals>.dummy_funcB   s    ;<<<r   r
   )r   r%   s     r   r   r   ?   s    	= 	= 	= 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   <module>r=      s)    
			 				 



     . . . . . . + + + + + + + +JJJJ   
CCC '#*
+
+I.//M8K8K8M8M4M 
     
 
 
   
BBB
 &,,,,,,  + + + +  
& 
& 
&   "&%L;;;
& vbDj1PQQQ  v
z"""B  
 6#+&DEEEfS_-STTTs0   ' 11!A) )
A65A6:B BB