[Python-checkins] cpython: Fix refleak in test_gc
antoine.pitrou
python-checkins at python.org
Mon Apr 16 21:30:59 CEST 2012
http://hg.python.org/cpython/rev/f4977fcbe57f
changeset: 76359:f4977fcbe57f
user: Antoine Pitrou <solipsis at pitrou.net>
date: Mon Apr 16 21:29:02 2012 +0200
summary:
Fix refleak in test_gc
files:
Lib/test/test_gc.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_gc.py b/Lib/test/test_gc.py
--- a/Lib/test/test_gc.py
+++ b/Lib/test/test_gc.py
@@ -551,6 +551,7 @@
gc.set_debug(0)
gc.callbacks.append(self.cb1)
gc.callbacks.append(self.cb2)
+ self.othergarbage = []
def tearDown(self):
# Restore gc state
@@ -566,9 +567,9 @@
if isinstance(obj, Uncollectable):
obj.partner = None
del gc.garbage[:]
+ del self.othergarbage
gc.collect()
- othergarbage = []
def preclean(self):
# Remove all fluff from the system. Invoke this function
# manually rather than through self.setUp() for maximum
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list