summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_runner/test_parallel.py5
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])