projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71382cb
)
Fix refleak in test_gc
author
Antoine Pitrou
<solipsis@pitrou.net>
Mon, 16 Apr 2012 19:29:02 +0000
(21:29 +0200)
committer
Antoine Pitrou
<solipsis@pitrou.net>
Mon, 16 Apr 2012 19:29:02 +0000
(21:29 +0200)
Lib/test/test_gc.py
patch
|
blob
|
history
diff --git
a/Lib/test/test_gc.py
b/Lib/test/test_gc.py
index caf5a3d0f96bef18f8bcd231cffab48501fe0483..90369752c9cf96277ba9fa899a6f4f5f99f9969e 100644
(file)
--- 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