Skip to content

Commit 03f8ab4

Browse files
committed
test_map_exception: only search for exception that captures itself in its own traceback
1 parent c4b771a commit 03f8ab4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_concurrent_futures/executor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ def test_map_exception(self):
7979
var: val
8080
for var, val in tb.tb_frame.f_locals.items()
8181
if isinstance(val, Exception)
82+
and var in val.__traceback__.tb_frame.f_locals
8283
},
83-
msg=f"traceback frames should not contain any exception",
84+
msg=f"the raised exception's traceback should not contain an exception that captures itself in its own traceback",
8485
)
8586

8687
@support.requires_resource('walltime')

0 commit comments

Comments
 (0)