summaryrefslogtreecommitdiffstats
path: root/AppPkg/Applications/Python/Python-2.7.2/Lib/test/leakers/test_dictself.py
diff options
context:
space:
mode:
Diffstat (limited to 'AppPkg/Applications/Python/Python-2.7.2/Lib/test/leakers/test_dictself.py')
-rw-r--r--AppPkg/Applications/Python/Python-2.7.2/Lib/test/leakers/test_dictself.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/test/leakers/test_dictself.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/test/leakers/test_dictself.py
new file mode 100644
index 0000000000..354b24245c
--- /dev/null
+++ b/AppPkg/Applications/Python/Python-2.7.2/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()