From: Guido van Rossum Date: Fri, 14 Jun 2002 02:35:45 +0000 (+0000) Subject: Test for the bug in recurse_down_subclasses() that I just fixed. X-Git-Tag: v2.3c1~5314 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e7f3e24eebd88a563d1dfaf6d6ac38a906abb4cb;p=thirdparty%2FPython%2Fcpython.git Test for the bug in recurse_down_subclasses() that I just fixed. --- diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 1168106f89c7..852115be2164 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -2773,6 +2773,16 @@ def subclasspropagation(): else: 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 # SF bug [#470040] ParseTuple t# vs subclasses.