summaryrefslogtreecommitdiff
path: root/Lib/test/test_module.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-12-15 15:57:15 -0500
committerBenjamin Peterson <benjamin@python.org>2011-12-15 15:57:15 -0500
commitca81bf76e582472e708f4a826e9f80edd7d7b423 (patch)
treec32c81f37a827c19b8154f9136565a46bcaa1ba8 /Lib/test/test_module.py
parent57c9c7b755671b7d212ead8988c34d9cf0b11fb3 (diff)
downloadcpython-git-ca81bf76e582472e708f4a826e9f80edd7d7b423.tar.gz
fix this test to actually test something (closes #13606)
Thanks Mark Shannon.
Diffstat (limited to 'Lib/test/test_module.py')
-rw-r--r--Lib/test/test_module.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_module.py b/Lib/test/test_module.py
index 7734fb04a2..56177894b3 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 __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()