mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
fix this test to actually test something (closes #13606)
Thanks Mark Shannon.
This commit is contained in:
parent
57c9c7b755
commit
ca81bf76e5
1 changed files with 4 additions and 2 deletions
|
|
@ -70,9 +70,11 @@ def test_clear_dict_in_ref_cycle(self):
|
|||
m = ModuleType("foo")
|
||||
m.destroyed = destroyed
|
||||
s = """class A:
|
||||
def __init__(self, l):
|
||||
self.l = l
|
||||
def __del__(self):
|
||||
destroyed.append(1)
|
||||
a = A()"""
|
||||
self.l.append(1)
|
||||
a = A(destroyed)"""
|
||||
exec(s, m.__dict__)
|
||||
del m
|
||||
gc_collect()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue