Skip to content

Commit 3dc2461

Browse files
committed
assert there are no reference cycles at all
1 parent f59c749 commit 3dc2461

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Lib/test/test_concurrent_futures/executor.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,7 @@ def test_map_exception(self):
6969

7070
# a failed future should not be captured in its
7171
# future._exception.__traceback__ to avoid a reference cycle
72-
self.assertFalse(
73-
[
74-
referrer
75-
for referrer in gc.get_referrers(error)
76-
if isinstance(referrer, futures.Future)
77-
],
78-
msg="none of the referrers should be a Future",
79-
)
72+
self.assertListEqual(gc.get_referrers(error), [])
8073

8174
@support.requires_resource('walltime')
8275
def test_map_timeout(self):

0 commit comments

Comments
 (0)