summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-02-19 15:17:30 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-02-19 15:17:30 (GMT)
commitb900d6a78c4146143b3f46111e6082e572d93d98 (patch)
tree1c8c78d139762efc3eacf0f1fe8ec982aca5b8b5 /Lib
parent488a56d2fb3697539fdd6b44df378954066924fe (diff)
downloadcpython-b900d6a78c4146143b3f46111e6082e572d93d98.zip
cpython-b900d6a78c4146143b3f46111e6082e572d93d98.tar.gz
cpython-b900d6a78c4146143b3f46111e6082e572d93d98.tar.bz2
initialize __dict__ if needed
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_descr.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 2227779..7b9a523 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -1444,6 +1444,7 @@ order (MRO) for bases """
self.fail("classmethod shouldn't accept keyword args")
cm = classmethod(f)
+ self.assertEqual(cm.__dict__, {})
cm.x = 42
self.assertEqual(cm.x, 42)
self.assertEqual(cm.__dict__, {"x" : 42})
@@ -1482,6 +1483,7 @@ order (MRO) for bases """
self.assertEqual(d.foo(1), (d, 1))
self.assertEqual(D.foo(d, 1), (d, 1))
sm = staticmethod(None)
+ self.assertEqual(sm.__dict__, {})
sm.x = 42
self.assertEqual(sm.x, 42)
self.assertEqual(sm.__dict__, {"x" : 42})