mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Add the original test case of bug #1469629,
formatted according to local conventions.
This commit is contained in:
parent
8664d74966
commit
5f42a852f8
1 changed files with 12 additions and 0 deletions
12
Lib/test/leakers/test_dictself.py
Normal file
12
Lib/test/leakers/test_dictself.py
Normal file
|
@ -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()
|
Loading…
Add table
Add a link
Reference in a new issue