summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_funcattrs.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_funcattrs.py')
-rw-r--r--Lib/test/test_funcattrs.py16
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