ó
    HWh 	  ã                   ól  • S 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 SSKrS r SSKJr  S	 rS
 rS r\" \SL SS9r\" \R,                  R/                  S5      (       + SS9r\" \	SL SS9r\" \	SLSS9rg! \
 a    Sr	 Nlf = f! \
 a    S rSr Nlf = f! \
 a
    S rS=rr Nrf = f)z
Small utilities for testing.
é    N)Úmp)ÚSkipTestÚskipifÚpypy_version_infoc                 ó   • U $ )ú*A decorator to skip tests requiring numpy.© ©Úfuncs    Ú4/usr/lib/python3/dist-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   )   r   r   c                 ór   • [         R                  " 5         [        XU4SS9n[        U5      [	        U5      -
  $ )z)Compute memory usage when executing func.gü©ñÒMbP?)Úinterval)ÚgcÚcollectr   ÚmaxÚmin)r   ÚargsÚkwargsÚmem_uses       r   Úmemory_usedr"   -   s/   € ä
�
Š
ŒÜ ¨FÐ3¸dÑCˆÜ�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_func6   s   € ÜÐ;Ó<Ð<r   r	   )r   r%   s     r   r   r   4   s   € ò	=àÐr   c                  óh   • [         (       a'  SS Kn U R                  " 5         U R                  " 5         g g )Nr   )ÚIS_PYPYr   r   )r   s    r   Úforce_gc_pypyr)   =   s%   € ÷ ‚wó 	Ø
�
Š
ŒØ
�
Š
�ð 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__Úosr   ÚsysÚjoblib._multiprocessing_helpersr   Újoblib.testingr   r   Úlz4ÚImportErrorÚhasattrr(   ÚnumpyÚnpr   Úmemory_profilerr   r   r"   r)   Úwith_multiprocessingÚpathÚexistsÚwith_dev_shmÚwith_lz4Úwithout_lz4r	   r   r   Ú<module>r<      s  ðñó 
Û 	Û 
å .ß +ðÛñ �#Ð*Ó
+€ðÛòð &Ý,òò+ò 	ñ Øˆ$€JÐ6ñ8Ð ñ Ø
�‰�‰�zÓ"Ô"ØBñD€ñ �#˜�+Ð&DÑE€áØˆt€OÐBñD�øðM ó Ø
‚Cðûð ó òð
 
‚Bðûð2 ó &òð "&Ð%€L’;ð&ús3   žB ¬B ´B# ÂBÂBÂB ÂB Â#B3Â2B3