Skip to content

Commit 0e42eca

Browse files
committed
feedback to get below 80 chars per pep8
1 parent d5f7578 commit 0e42eca

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Lib/test/test_concurrent_futures/test_process_pool.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,18 +236,20 @@ def mock_start_new_thread(func, *args, **kwargs):
236236
executor.shutdown()
237237

238238
def test_terminate_workers(self):
239+
mock_fn = unittest.mock.Mock()
239240
with self.executor_type(max_workers=1) as executor:
240-
executor._force_shutdown = unittest.mock.Mock()
241+
executor._force_shutdown = mock_fn
241242
executor.terminate_workers()
242243

243-
executor._force_shutdown.assert_called_once_with(operation=futures.process._TERMINATE)
244+
mock_fn.assert_called_once_with(operation=futures.process._TERMINATE)
244245

245246
def test_kill_workers(self):
247+
mock_fn = unittest.mock.Mock()
246248
with self.executor_type(max_workers=1) as executor:
247-
executor._force_shutdown = unittest.mock.Mock()
249+
executor._force_shutdown = mock_fn
248250
executor.kill_workers()
249251

250-
executor._force_shutdown.assert_called_once_with(operation=futures.process._KILL)
252+
mock_fn.assert_called_once_with(operation=futures.process._KILL)
251253

252254
def test_force_shutdown_workers_invalid_op(self):
253255
with self.executor_type(max_workers=1) as executor:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Add :meth:`concurrent.futures.ProcessPoolExecutor.terminate_workers` and
2-
:meth:`concurrent.futures.ProcessPoolExecutor.terminate_workers` as
2+
:meth:`concurrent.futures.ProcessPoolExecutor.kill_workers` as
33
ways to terminate or kill all living worker processes in the given pool.
44
(Contributed by Charles Machalow in :gh:`128043`.)

0 commit comments

Comments
 (0)