mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
Test for the bug in recurse_down_subclasses() that I just fixed.
This commit is contained in:
parent
59e6c53920
commit
e7f3e24eeb
1 changed files with 10 additions and 0 deletions
|
@ -2773,6 +2773,16 @@ def subclasspropagation():
|
||||||
else:
|
else:
|
||||||
raise TestFailed, "d.foo should be undefined now"
|
raise TestFailed, "d.foo should be undefined now"
|
||||||
|
|
||||||
|
# Test a nasty bug in recurse_down_subclasses()
|
||||||
|
import gc
|
||||||
|
class A(object):
|
||||||
|
pass
|
||||||
|
class B(A):
|
||||||
|
pass
|
||||||
|
del B
|
||||||
|
gc.collect()
|
||||||
|
A.__setitem__ = lambda *a: None # crash
|
||||||
|
|
||||||
def buffer_inherit():
|
def buffer_inherit():
|
||||||
import binascii
|
import binascii
|
||||||
# SF bug [#470040] ParseTuple t# vs subclasses.
|
# SF bug [#470040] ParseTuple t# vs subclasses.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue