Skip to content

Commit cfc8566

Browse files
Fix a test.
1 parent bf79702 commit cfc8566

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/test/test_concurrent_futures/test_interpreter_pool.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from concurrent.futures.interpreter import (
99
ExecutionFailed, BrokenInterpreterPool,
1010
)
11+
from concurrent import interpreters
1112
from concurrent.interpreters import _queues as queues
1213
import _interpreters
1314
from test import support
@@ -391,9 +392,10 @@ def test_pickle_errors_propagate(self):
391392
# GH-125864: Pickle errors happen before the script tries to execute,
392393
# so the queue used to wait infinitely.
393394
fut = self.executor.submit(PickleShenanigans(0))
394-
expected = _interpreters.NotShareableError
395-
with self.assertRaisesRegex(expected, 'unpickled'):
395+
expected = interpreters.NotShareableError
396+
with self.assertRaisesRegex(expected, 'args not shareable') as cm:
396397
fut.result()
398+
self.assertRegex(str(cm.exception.__cause__), 'unpickled')
397399

398400
def test_no_stale_references(self):
399401
# Weak references don't cross between interpreters.

0 commit comments

Comments
 (0)