[Python-checkins] python/dist/src/Lib/test test_descr.py,1.140,1.141
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Thu, 13 Jun 2002 19:35:47 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv2033a
Modified Files:
test_descr.py
Log Message:
Test for the bug in recurse_down_subclasses() that I just fixed.
Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.140
retrieving revision 1.141
diff -C2 -d -r1.140 -r1.141
*** test_descr.py 13 Jun 2002 19:17:46 -0000 1.140
--- test_descr.py 14 Jun 2002 02:35:45 -0000 1.141
***************
*** 2774,2777 ****
--- 2774,2787 ----
raise TestFailed, "d.foo should be undefined now"
+ # Test a nasty bug in recurse_down_subclasses()
+ import gc
+ class A(object):
+ pass
+ class B(A):
+ pass
+ del B
+ gc.collect()
+ A.__setitem__ = lambda *a: None # crash
+
def buffer_inherit():
import binascii