diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-11-26 10:00:38 -0500 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-12-03 16:04:22 -0500 |
| commit | bd4a562a8849147d4aa4bd42f7fdb1b51f89bb84 (patch) | |
| tree | c68ca990737cbe8c17b4954efc62414ceb7fc10b /tests/test_runner | |
| parent | 93540b34d4ef46f68df2c8bfe90447d0f649a852 (diff) | |
Closed pool when parallel test runner encounters unpicklable exceptions.
Diffstat (limited to 'tests/test_runner')
| -rw-r--r-- | tests/test_runner/test_parallel.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_runner/test_parallel.py b/tests/test_runner/test_parallel.py index 32cc971d30..193afea1cc 100644 --- a/tests/test_runner/test_parallel.py +++ b/tests/test_runner/test_parallel.py @@ -309,9 +309,8 @@ class ParallelTestSuiteTest(SimpleTestCase): test_result.shouldStop = True return (0, remote_result.events) - mock_pool.return_value.imap_unordered.return_value = unittest.mock.Mock( - next=fake_next - ) + mock_imap = mock_pool.return_value.__enter__.return_value.imap_unordered + mock_imap.return_value = unittest.mock.Mock(next=fake_next) pts.run(test_result) self.assertIn("ValueError: woops", test_result.errors[0][1]) |
