From 80e36750c8f6bfd41bb392ec223f4815acf8ae72 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 14 Aug 2001 20:00:33 +0000 Subject: Add a test for a weird bug I just discovered: a dynamic subclass doesn't have a __dict__! --- Lib/test/test_descr.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index bdde451..e461526 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..." -- cgit v0.12