Skip to content

Commit 19edced

Browse files
committed
test there is no future in referrers
1 parent 7dc850b commit 19edced

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Lib/test/test_concurrent_futures/executor.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ def test_map_exception(self):
6969

7070
# a failed future must not be captured in its
7171
# future._exception.__traceback__ to avoid a reference cycle
72-
self.assertFalse(gc.get_referrers(error))
72+
self.assertFalse(
73+
any(
74+
isinstance(referrer, futures.Future)
75+
for referrer in gc.get_referrers(error)
76+
)
77+
)
7378

7479
@support.requires_resource('walltime')
7580
def test_map_timeout(self):

0 commit comments

Comments
 (0)