File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Lib/test/test_concurrent_futures Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 88from concurrent .futures .interpreter import (
99 ExecutionFailed , BrokenInterpreterPool ,
1010)
11+ from concurrent import interpreters
1112from concurrent .interpreters import _queues as queues
1213import _interpreters
1314from 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.
You can’t perform that action at this time.
0 commit comments