summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_class.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py
index b8b4cab..601b8b4 100644
--- a/Lib/test/test_class.py
+++ b/Lib/test/test_class.py
@@ -115,9 +115,12 @@ def __%(method)s__(self, *args):
print "__%(method)s__:", args
"""
+d = {}
for method in testmeths:
- exec method_template % locals() in AllTests.__dict__
-
+ exec method_template % locals() in d
+for k in d:
+ setattr(AllTests, k, d[k])
+del d, k
del method, method_template
# this also tests __init__ of course.