fix this test to actually test something (closes #13606)

Thanks Mark Shannon.
This commit is contained in:
Benjamin Peterson 2011-12-15 15:57:15 -05:00
parent 57c9c7b755
commit ca81bf76e5
1 changed files with 4 additions and 2 deletions

View File

@ -70,9 +70,11 @@ class ModuleTests(unittest.TestCase):
m = ModuleType("foo") m = ModuleType("foo")
m.destroyed = destroyed m.destroyed = destroyed
s = """class A: s = """class A:
def __init__(self, l):
self.l = l
def __del__(self): def __del__(self):
destroyed.append(1) self.l.append(1)
a = A()""" a = A(destroyed)"""
exec(s, m.__dict__) exec(s, m.__dict__)
del m del m
gc_collect() gc_collect()