[Python-3000-checkins] r45430 - python/branches/p3yk/Lib/test/test_class.py
thomas.wouters
python-3000-checkins at python.org
Sat Apr 15 11:19:16 CEST 2006
Author: thomas.wouters
Date: Sat Apr 15 11:19:16 2006
New Revision: 45430
Modified:
python/branches/p3yk/Lib/test/test_class.py
Log:
Make test_class work (but still fail) even though class.__dict__ is now a
'dictproxy' (which is a read-only non-dict mapping type that can't be passed
to exec.)
The failures the test finds are behavioural differences between old- and
new-style classes that may or may not be intended.
Modified: python/branches/p3yk/Lib/test/test_class.py
==============================================================================
--- python/branches/p3yk/Lib/test/test_class.py (original)
+++ python/branches/p3yk/Lib/test/test_class.py Sat Apr 15 11:19:16 2006
@@ -115,9 +115,12 @@
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.
More information about the Python-3000-checkins
mailing list