mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Prevent dangling threads/process warning for test_multiprocessing.
This commit is contained in:
parent
138d080a28
commit
14f5ee0a62
1 changed files with 7 additions and 4 deletions
|
@ -3561,14 +3561,17 @@ def setUpModule():
|
||||||
try:
|
try:
|
||||||
lock = multiprocessing.RLock()
|
lock = multiprocessing.RLock()
|
||||||
except OSError:
|
except OSError:
|
||||||
raise unittest.SkipTest("OSError raises on RLock creation, see issue 3111!")
|
raise unittest.SkipTest("OSError raises on RLock creation, "
|
||||||
|
"see issue 3111!")
|
||||||
check_enough_semaphores()
|
check_enough_semaphores()
|
||||||
|
|
||||||
util.get_temp_dir() # creates temp directory for use by all processes
|
util.get_temp_dir() # creates temp directory for use by all processes
|
||||||
|
|
||||||
multiprocessing.get_logger().setLevel(LOG_LEVEL)
|
multiprocessing.get_logger().setLevel(LOG_LEVEL)
|
||||||
|
|
||||||
|
|
||||||
|
def tearDownModule():
|
||||||
|
# pause a bit so we don't get warning about dangling threads/processes
|
||||||
|
time.sleep(0.5)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue