Add a test for a weird bug I just discovered: a dynamic subclass

doesn't have a __dict__!
This commit is contained in:
Guido van Rossum 2001-08-14 20:00:33 +00:00
parent d3ba10f4b5
commit 80e36750c8
1 changed files with 5 additions and 0 deletions

View File

@ -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..."