Skip to content

Commit d225c7f

Browse files
committed
Workaround for PyPy test failure
gc_collect needs to be called twice to persuade PyPy to run the destructors we care about.
1 parent 84550a8 commit d225c7f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/test_call_policies.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ class Derived(Parent):
100100
with capture:
101101
del p, lst
102102
pytest.gc_collect()
103+
pytest.gc_collect() # Needed to make PyPy free the child
103104
assert capture == """
104105
Releasing parent.
105106
Releasing child.

0 commit comments

Comments
 (0)