mirror of https://github.com/python/cpython
fix this test to actually test something (closes #13606)
Thanks Mark Shannon.
This commit is contained in:
parent
57c9c7b755
commit
ca81bf76e5
|
@ -70,9 +70,11 @@ class ModuleTests(unittest.TestCase):
|
|||
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…
Reference in New Issue