File tree Expand file tree Collapse file tree 1 file changed +0
-10
lines changed
Lib/test/test_concurrent_futures Expand file tree Collapse file tree 1 file changed +0
-10
lines changed Original file line number Diff line number Diff line change @@ -242,21 +242,11 @@ def test_process_pool_executor_terminate_workers(self):
242242
243243 self .assertRaises (queue .Empty , q .get , timeout = 1 )
244244
245-
246245 def test_process_pool_executor_terminate_workers_dead_workers (self ):
247246 with futures .ProcessPoolExecutor (max_workers = 1 ) as executor :
248247 future = executor .submit (os ._exit , 1 )
249248 self .assertRaises (BrokenProcessPool , future .result )
250249
251- # Patching in here instead of at the function level since we only want
252- # to patch it for this function call, not other parts of the flow.
253- with unittest .mock .patch ('concurrent.futures.process.os.kill' ) as mock_kill :
254- with unittest .mock .patch .object (executor , 'shutdown' ) as mock_shutdown :
255- executor .terminate_workers ()
256- mock_shutdown .assert_called_once_with (wait = False , cancel_futures = True )
257-
258- mock_kill .assert_not_called ()
259-
260250 @unittest .mock .patch ('concurrent.futures.process.os.kill' )
261251 def test_process_pool_executor_terminate_workers_not_started_yet (self , mock_kill ):
262252 with futures .ProcessPoolExecutor (max_workers = 1 ) as executor :
You can’t perform that action at this time.
0 commit comments