[Python-checkins] CVS: python/dist/src/Lib/test test_funcattrs.py,1.2,1.3
Barry Warsaw
bwarsaw@users.sourceforge.net
Fri, 19 Jan 2001 11:55:14 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv1439
Modified Files:
test_funcattrs.py
Log Message:
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).
Index: test_funcattrs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_funcattrs.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** test_funcattrs.py 2001/01/15 21:00:02 1.2
--- test_funcattrs.py 2001/01/19 19:55:12 1.3
***************
*** 139,140 ****
--- 139,156 ----
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