[Python-checkins] python/dist/src/Lib/test test_descr.py,1.113.4.17,1.113.4.18

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Thu, 13 Jun 2002 19:37:02 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv2316

Modified Files:
      Tag: release22-maint
	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.113.4.17
retrieving revision 1.113.4.18
diff -C2 -d -r1.113.4.17 -r1.113.4.18
*** test_descr.py	6 Jun 2002 17:55:35 -0000	1.113.4.17
--- test_descr.py	14 Jun 2002 02:37:00 -0000	1.113.4.18
***************
*** 2706,2709 ****
--- 2706,2719 ----
          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