a
    ’Àh–  ã                   @   sX   d dl Z d dlZd dlmZ d dlmZ dd„ Zedd„ ƒZedd	„ ƒZed
d„ ƒZ	dS )é    N)Úwith_multiprocessing)Úcheck_subprocess_callc                   C   s   t tdƒsJ dƒ‚d S )NÚ__version__z6There are no __version__ argument on the joblib module)ÚhasattrÚjoblib© r   r   úS/var/www/html/assistant/venv/lib/python3.9/site-packages/joblib/test/test_module.pyÚtest_version   s    ÿr	   c                  C   s   d} t tjd| gƒ d S )NzÐif True:
        import joblib
        import multiprocessing as mp
        # The following line would raise RuntimeError if the
        # start_method is already set.
        mp.set_start_method("loky")
    ú-c©r   ÚsysÚ
executable©Úcoder   r   r   Ú*test_no_start_method_side_effect_on_import   s    r   c                  C   s.   d} t jdkr|  dd¡} tt jd| gƒ d S )NaJ  if True:
        import joblib
        from multiprocessing import semaphore_tracker
        # The following line would raise RuntimeError if the
        # start_method is already set.
        msg = "multiprocessing.semaphore_tracker has been spawned on import"
        assert semaphore_tracker._semaphore_tracker._fd is None, msg)é   é   Zsemaphore_trackerZresource_trackerr
   )r   Úversion_infoÚreplacer   r   r   r   r   r   Ú#test_no_semaphore_tracker_on_import   s    
r   c                  C   s   d} t tjd| gƒ d S )NaN  if True:
        import joblib
        from joblib.externals.loky.backend import resource_tracker
        # The following line would raise RuntimeError if the
        # start_method is already set.
        msg = "loky.resource_tracker has been spawned on import"
        assert resource_tracker._resource_tracker._fd is None, msg
    r
   r   r   r   r   r   Ú"test_no_resource_tracker_on_import-   s    r   )
r   r   Zjoblib.test.commonr   Zjoblib.testingr   r	   r   r   r   r   r   r   r   Ú<module>   s   

