diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-22 22:28:38 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-22 22:28:38 (GMT) |
commit | c26a1a490fd290fb40bf00a8014834484aeafdd4 (patch) | |
tree | 909803fad65c013555a1755d0f9099b51d8291ec /Lib | |
parent | 80a1803193bcaef7a50324974117c3aa3fb0e48f (diff) | |
download | cpython-c26a1a490fd290fb40bf00a8014834484aeafdd4.zip cpython-c26a1a490fd290fb40bf00a8014834484aeafdd4.tar.gz cpython-c26a1a490fd290fb40bf00a8014834484aeafdd4.tar.bz2 |
Broke reference loops in tests added in issue #5700.
Diffstat (limited to 'Lib')
-rw-r--r-- | 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 index 79cd87b..668b023 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -606,6 +606,7 @@ class IOTest(unittest.TestCase): 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 @@ class CommonBufferedTests: 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 @@ class TextIOWrapperTest(unittest.TestCase): 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) |