diff options
author | Barry Warsaw <barry@python.org> | 2001-01-19 19:55:12 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2001-01-19 19:55:12 (GMT) |
commit | 2e9b3967403c87592d6356ea486858f452767507 (patch) | |
tree | 6f9798e51888e0d18c0232c8ced31a627f9736f7 | |
parent | 0395fdd3a9249356f6efde5f8a5313df2d0c2b8c (diff) | |
download | cpython-2e9b3967403c87592d6356ea486858f452767507.zip cpython-2e9b3967403c87592d6356ea486858f452767507.tar.gz cpython-2e9b3967403c87592d6356ea486858f452767507.tar.bz2 |
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).
-rw-r--r-- | Lib/test/test_funcattrs.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_funcattrs.py b/Lib/test/test_funcattrs.py index 9d3ec18..9c07a8f 100644 --- a/Lib/test/test_funcattrs.py +++ b/Lib/test/test_funcattrs.py @@ -138,3 +138,19 @@ try: eff.id.foo except AttributeError: pass 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 |