From: Armin Rigo Date: Tue, 24 Aug 2010 12:53:02 +0000 (+0000) Subject: Add the original test case of bug #1469629, X-Git-Tag: v2.7.1rc1~368 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f42a852f838f831447b741cdb4db589e405b86c;p=thirdparty%2FPython%2Fcpython.git Add the original test case of bug #1469629, formatted according to local conventions. --- diff --git a/Lib/test/leakers/test_dictself.py b/Lib/test/leakers/test_dictself.py new file mode 100644 index 000000000000..99bd37d8ccf9 --- /dev/null +++ b/Lib/test/leakers/test_dictself.py @@ -0,0 +1,12 @@ +'''Test case for "self.__dict__ = self" circular reference bug (#1469629)''' + +import gc + +class LeakyDict(dict): + pass + +def leak(): + ld = LeakyDict() + ld.__dict__ = ld + del ld + gc.collect(); gc.collect(); gc.collect()