diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-04-16 19:29:02 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-04-16 19:29:02 (GMT) |
commit | 6b64fc6bffdb76b2fbe60b69df1845c13e0a0a23 (patch) | |
tree | 1d2bfad8da4c17a0b3f87bb038b0619c922bd89f /Lib/test/test_gc.py | |
parent | 71382cb64bd9cbf76d8a1e0fe8297a973cd1fe4d (diff) | |
download | cpython-6b64fc6bffdb76b2fbe60b69df1845c13e0a0a23.zip cpython-6b64fc6bffdb76b2fbe60b69df1845c13e0a0a23.tar.gz cpython-6b64fc6bffdb76b2fbe60b69df1845c13e0a0a23.tar.bz2 |
Fix refleak in test_gc
Diffstat (limited to 'Lib/test/test_gc.py')
-rw-r--r-- | 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 index caf5a3d..9036975 100644 --- a/Lib/test/test_gc.py +++ b/Lib/test/test_gc.py @@ -551,6 +551,7 @@ class GCCallbackTests(unittest.TestCase): 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 @@ class GCCallbackTests(unittest.TestCase): 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 |