mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +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:
|
else:
|
||||||
verify(0, "expected AttributeError")
|
verify(0, "expected AttributeError")
|
||||||
verify(a.spam == "spam")
|
verify(a.spam == "spam")
|
||||||
|
class D(C):
|
||||||
|
pass
|
||||||
|
d = D()
|
||||||
|
d.foo = 1
|
||||||
|
verify(d.foo == 1)
|
||||||
|
|
||||||
def errors():
|
def errors():
|
||||||
if verbose: print "Testing errors..."
|
if verbose: print "Testing errors..."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue