Import Upstream version 2.7.18
This commit is contained in:
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()
|
||||
Reference in New Issue
Block a user