From: Barry Warsaw Date: Fri, 19 Jan 2001 19:55:12 +0000 (+0000) Subject: Add some regression tests of coredump bugs in funcobject.c 2.31. Also X-Git-Tag: v2.1a1~105 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e9b3967403c87592d6356ea486858f452767507;p=python 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). --- diff --git a/Lib/test/test_funcattrs.py b/Lib/test/test_funcattrs.py index 9d3ec18a2f..9c07a8fee6 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