Debian Codegraph @

cpython27/Lib/test/leakers/test_dictself.py

raw symbols SCIP
1 '''Test case for "self.__dict__ = self" circular reference bug (#1469629)'''
2
3 import gc
4
5 class LeakyDict(dict):
6 pass
7
8 def leak():
9 ld = LeakyDict()
10 ld.__dict__ = ld
11 del ld
12 gc.collect(); gc.collect(); gc.collect()