]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
don't rely on the order of module clearing
authorBenjamin Peterson <benjamin@python.org>
Mon, 20 Feb 2012 20:20:37 +0000 (15:20 -0500)
committerBenjamin Peterson <benjamin@python.org>
Mon, 20 Feb 2012 20:20:37 +0000 (15:20 -0500)
Lib/test/test_module.py

index 7734fb04a260e694b7241704b36a3ae872296458..15836cac93ec680297ce517014f40314f89f92a3 100644 (file)
@@ -70,7 +70,7 @@ class ModuleTests(unittest.TestCase):
         m = ModuleType("foo")
         m.destroyed = destroyed
         s = """class A:
-    def __del__(self):
+    def __del__(self, destroyed=destroyed):
         destroyed.append(1)
 a = A()"""
         exec(s, m.__dict__)