/usr/local/lib/python3.6/site-packages/joblib/test
NameSizeModeActions
data/-0755rm
__pycache__/-0755rm
common.py32830644editdlrm
testutils.py2510644editdlrm
test_backports.py11750644editdlrm
test_cloudpickle_wrapper.py7490644editdlrm
test_dask.py170530644editdlrm
test_deprecated_objects.py12490644editdlrm
test_disk.py22050644editdlrm
test_format_stack.py42500644editdlrm
test_func_inspect.py89350644editdlrm
test_func_inspect_special_encoding.py1460644editdlrm
test_hashing.py160780644editdlrm
test_init.py4220644editdlrm
test_logger.py9850644editdlrm
test_memmapping.py421540644editdlrm
test_memory.py448100644editdlrm
test_missing_multiprocessing.py11230644editdlrm
test_module.py18320644editdlrm
test_my_exceptions.py20660644editdlrm
test_numpy_pickle.py387000644editdlrm
test_numpy_pickle_compat.py6240644editdlrm
test_numpy_pickle_utils.py4210644editdlrm
test_parallel.py596530644editdlrm
test_store_backends.py19420644editdlrm
test_testing.py24670644editdlrm
test_utils.py5840644editdlrm
__init__.py730644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/joblib/test/test_module.py (1832B)
import sys import joblib import pytest from joblib.testing import check_subprocess_call def test_version(): assert hasattr(joblib, '__version__'), ( "There are no __version__ argument on the joblib module") def test_no_start_method_side_effect_on_import(): # check that importing joblib does not implicitly set the global # start_method for multiprocessing. code = """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") """ check_subprocess_call([sys.executable, '-c', code]) def test_no_semaphore_tracker_on_import(): # check that importing joblib does not implicitly spawn a resource tracker # or a semaphore tracker code = """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""" if sys.version_info >= (3, 8): # semaphore_tracker was renamed in Python 3.8: code = code.replace("semaphore_tracker", "resource_tracker") check_subprocess_call([sys.executable, '-c', code]) def test_no_resource_tracker_on_import(): code = """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 """ check_subprocess_call([sys.executable, '-c', code])