mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Add a test for a weird bug I just discovered: a dynamic subclass
doesn't have a __dict__!
This commit is contained in:
parent
d3ba10f4b5
commit
80e36750c8
1 changed files with 5 additions and 0 deletions
|
@ -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..."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue