From: Guido van Rossum Date: Fri, 14 Jun 2002 02:37:00 +0000 (+0000) Subject: Test for the bug in recurse_down_subclasses() that I just fixed. X-Git-Tag: v2.2.2b1~322 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=29cb1d737e575f6441da1e8a3371ea2312fe5182;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 5ef3f8c41a49..a526ad4769ff 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -2705,6 +2705,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.