]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix this test to actually test something (closes #13606)
authorBenjamin Peterson <benjamin@python.org>
Thu, 15 Dec 2011 20:57:15 +0000 (15:57 -0500)
committerBenjamin Peterson <benjamin@python.org>
Thu, 15 Dec 2011 20:57:15 +0000 (15:57 -0500)
Thanks Mark Shannon.

Lib/test/test_module.py

index 7734fb04a260e694b7241704b36a3ae872296458..56177894b34af7dfe2e5c44c380fffceebf1c693 100644 (file)
@@ -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()