
    7Th6                        S r SSKrSSKrSSKrSSKrSSKJr  SSKJrJ	r	   SSK
r
\" \S5      r\R                  " S5      =(       a    \R                  " 5       (       + r SSKrS r SS	KJr  S
 rS r\	" \SL SS9r\	" \R2                  R5                  S5      (       + SS9r\	" \
SL SS9r\	" \
SLSS9rg! \ a    Sr
 Nf = f! \ a    S rSr Nif = f! \ a
    S rS=rr Nof = f)z
Small utilities for testing.
    N)mp)SkipTestskipifpypy_version_infoPy_GIL_DISABLEDc                     U $ )*A decorator to skip tests requiring numpy. funcs    J/var/www/auris/envauris/lib/python3.13/site-packages/joblib/test/common.py
with_numpyr              c                     S nU$ )r	   c                      [        S5      e)NzTest requires numpyr   r
   r   r   my_funcwith_numpy.<locals>.my_func%   s    011r   r
   )r   r   s     r   r   r   "   s    	2 r   )memory_usagec                     U $ )4A decorator to skip tests requiring memory_profiler.r
   r   s    r   with_memory_profilerr   3   r   r   c                 r    [         R                  " 5         [        XU4SS9n[        U5      [	        U5      -
  $ )z)Compute memory usage when executing func.gMbP?)interval)gccollectr   maxmin)r   argskwargsmem_uses       r   memory_usedr#   7   s/    


F3eD7|c'l**r   c                     S nU$ )r   c                      [        S5      e)NzTest requires memory_profiler.r   r
   r   r   
dummy_func(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'   
 	 
  . +
 #*
+./M8K8K8M4M 
(&,+& bDj1PQ  
z""B
 #+&DES_-STK  
C"  
 
B
:  
& "&%L;
&s5   B4 C 'C 4B?>B?CCC#"C#