Ë
    ÷Q(h6  ã                   óÄ  — 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
 eed«      Z ej                  d«      xr  ej                  «        Z	 ddlZd„ Z	 dd	lmZ d
„ Zd„ Z e	edu d¬«      Z e	ej2                  j5                  d«       d¬«      Z e	e
du d¬«      Z e	e
dud¬«      Zy# e$ r dZ
Y Œ–w xY w# e$ r d„ ZdZY Œow xY w# e$ r
 d„ ZdxZZY Œtw xY w)z
Small utilities for testing.
é    N)Úmp)ÚSkipTestÚskipifÚpypy_version_infoÚPy_GIL_DISABLEDc                 ó   — | S )ú*A decorator to skip tests requiring numpy.© ©Úfuncs    úP/var/www/skyplay_api_hub/venv/lib/python3.12/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Ð1r   r
   )r   r   s     r   r   r   "   s   € ò	2ð ˆr   )Úmemory_usagec                 ó   — | S )ú4A decorator to skip tests requiring memory_profiler.r
   r   s    r   Úwith_memory_profilerr   3   r   r   c                 óx   — t        j                  «        t        | ||fd¬«      }t        |«      t	        |«      z
  S )z)Compute memory usage when executing func.gü©ñÒMbP?)Úinterval)ÚgcÚcollectr   ÚmaxÚmin)r   ÚargsÚkwargsÚmem_uses       r   Úmemory_usedr"   7   s1   € ä
�
‰
ŒÜ  d¨FÐ3¸eÔDˆÜ�7‹|œc '›lÑ*Ð*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,  ðñó 
Û 	Û 
Û å .ß +ðÛñ
 �#Ð*Ó
+€à€I×ÑÐ.Ó/ÒMÐ8K¸×8KÑ8KÓ8MÐ4Mð ð
Ûòð(&Ý,òò+ñ& ˜b D˜jÐ1PÔQÐ ñ Ø
�‰�‰�zÓ"Ð"ØBô€ñ
 �#˜�+Ð&DÔE€á�S �_Ð-SÔT�øðK ò Ø
‚Cðûð" ò 
òð 
‚Bð
ûð: ò 
&òð "&Ð%€L’;ð
&ús5   ¢B3 ÁC  ÁC Â3B=Â<B=Ã 
CÃCÃCÃC