MCPcopy Index your code
hub / github.com/RustPython/RustPython / setUpModule

Function setUpModule

Lib/test/_test_multiprocessing.py:6757–6777  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6755 old_start_method = [None]
6756
6757 def setUpModule():
6758 multiprocessing.set_forkserver_preload(PRELOAD)
6759 multiprocessing.process._cleanup()
6760 dangling[0] = multiprocessing.process._dangling.copy()
6761 dangling[1] = threading._dangling.copy()
6762 old_start_method[0] = multiprocessing.get_start_method(allow_none=True)
6763 try:
6764 multiprocessing.set_start_method(start_method, force=True)
6765 except ValueError:
6766 raise unittest.SkipTest(start_method +
6767 ' start method not supported')
6768
6769 if sys.platform.startswith("linux"):
6770 try:
6771 lock = multiprocessing.RLock()
6772 except OSError:
6773 raise unittest.SkipTest("OSError raises on RLock creation, "
6774 "see issue 3111!")
6775 check_enough_semaphores()
6776 util.get_temp_dir() # creates temp directory
6777 multiprocessing.get_logger().setLevel(LOG_LEVEL)
6778
6779 def tearDownModule():
6780 need_sleep = False

Callers

nothing calls this directly

Calls 10

check_enough_semaphoresFunction · 0.85
RLockMethod · 0.80
get_loggerMethod · 0.80
_cleanupMethod · 0.45
copyMethod · 0.45
get_start_methodMethod · 0.45
set_start_methodMethod · 0.45
startswithMethod · 0.45
setLevelMethod · 0.45

Tested by

no test coverage detected