diff options
Diffstat (limited to 'Lib/test/test_module.py')
-rw-r--r-- | Lib/test/test_module.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_module.py b/Lib/test/test_module.py index 15836ca..5617789 100644 --- a/Lib/test/test_module.py +++ b/Lib/test/test_module.py @@ -70,9 +70,11 @@ class ModuleTests(unittest.TestCase): m = ModuleType("foo") m.destroyed = destroyed s = """class A: - def __del__(self, destroyed=destroyed): - destroyed.append(1) -a = A()""" + def __init__(self, l): + self.l = l + def __del__(self): + self.l.append(1) +a = A(destroyed)""" exec(s, m.__dict__) del m gc_collect() |