Add some regression tests of coredump bugs in funcobject.c 2.31. Also
added a test of a coredump that would occur when del'ing func_defaults (put here for convenience).
This commit is contained in:
parent
0395fdd3a9
commit
2e9b396740
|
@ -138,3 +138,19 @@ try:
|
||||||
eff.id.foo
|
eff.id.foo
|
||||||
except AttributeError: pass
|
except AttributeError: pass
|
||||||
else: raise TestFailed
|
else: raise TestFailed
|
||||||
|
|
||||||
|
# Regression test for a crash in pre-2.1a1
|
||||||
|
def another():
|
||||||
|
pass
|
||||||
|
del another.__dict__
|
||||||
|
del another.func_dict
|
||||||
|
another.func_dict = None
|
||||||
|
|
||||||
|
try:
|
||||||
|
del another.bar
|
||||||
|
except AttributeError: pass
|
||||||
|
else: raise TestFailed
|
||||||
|
|
||||||
|
# This isn't specifically related to function attributes, but it does test a
|
||||||
|
# core dump regression in funcobject.c
|
||||||
|
del another.func_defaults
|
||||||
|
|
Loading…
Reference in New Issue