[Python-checkins] cpython (3.4): Broke reference loops in tests added in issue #5700.
serhiy.storchaka
python-checkins at python.org
Sun Feb 22 23:33:58 CET 2015
https://hg.python.org/cpython/rev/00bde0743690
changeset: 94728:00bde0743690
branch: 3.4
parent: 94723:1628484c9408
user: Serhiy Storchaka <storchaka at gmail.com>
date: Mon Feb 23 00:28:38 2015 +0200
summary:
Broke reference loops in tests added in issue #5700.
files:
Lib/test/test_io.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -606,6 +606,7 @@
self.assertTrue(f.closed)
self.assertTrue(closed) # flush() called
self.assertFalse(closed[0]) # flush() called before file closed
+ f.flush = lambda: None # break reference loop
def test_flush_error_on_close(self):
# raw file
@@ -833,6 +834,7 @@
self.assertTrue(closed) # flush() called
self.assertFalse(closed[0]) # flush() called before file closed
self.assertFalse(closed[1])
+ raw.flush = lambda: None # break reference loop
def test_close_error_on_close(self):
raw = self.MockRawIO()
@@ -2670,6 +2672,7 @@
self.assertTrue(closed) # flush() called
self.assertFalse(closed[0]) # flush() called before file closed
self.assertFalse(closed[1])
+ txt.flush = lambda: None # break reference loop
def test_close_error_on_close(self):
buffer = self.BytesIO(self.testdata)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list