From: Guido van Rossum Date: Tue, 14 Aug 2001 20:00:33 +0000 (+0000) Subject: Add a test for a weird bug I just discovered: a dynamic subclass X-Git-Tag: v2.2a3~561 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=80e36750c8f6bfd41bb392ec223f4815acf8ae72;p=thirdparty%2FPython%2Fcpython.git Add a test for a weird bug I just discovered: a dynamic subclass doesn't have a __dict__! --- diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index bdde4519695f..e4615260220a 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -613,6 +613,11 @@ def dynamics(): else: verify(0, "expected AttributeError") verify(a.spam == "spam") + class D(C): + pass + d = D() + d.foo = 1 + verify(d.foo == 1) def errors(): if verbose: print "Testing errors..."