Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Unified Diff: Lib/test/test_io.py

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/test/test_ioctl.py ('k') | Lib/test/test_itertools.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_io.py Tue Jul 26 09:37:46 2011 +0300
+++ b/Lib/test/test_io.py Mon Jul 25 09:47:18 2011 -0400
@@ -611,24 +611,7 @@
self.assertEqual(rawio.read(2), b"")
class CIOTest(IOTest):
-
- def test_IOBase_finalize(self):
- # Issue #12149: segmentation fault on _PyIOBase_finalize when both a
- # class which inherits IOBase and an object of this class are caught
- # in a reference cycle and close() is already in the method cache.
- class MyIO(self.IOBase):
- def close(self):
- pass
-
- # create an instance to populate the method cache
- MyIO()
- obj = MyIO()
- obj.obj = obj
- wr = weakref.ref(obj)
- del MyIO
- del obj
- support.gc_collect()
- self.assertTrue(wr() is None, wr)
+ pass
class PyIOTest(IOTest):
pass
@@ -2314,27 +2297,6 @@
with self.assertRaises(AttributeError):
txt.buffer = buf
- def test_rawio(self):
- # Issue #12591: TextIOWrapper must work with raw I/O objects, so
- # that subprocess.Popen() can have the required unbuffered
- # semantics with universal_newlines=True.
- raw = self.MockRawIO([b'abc', b'def', b'ghi\njkl\nopq\n'])
- txt = self.TextIOWrapper(raw, encoding='ascii', newline='\n')
- # Reads
- self.assertEqual(txt.read(4), 'abcd')
- self.assertEqual(txt.readline(), 'efghi\n')
- self.assertEqual(list(txt), ['jkl\n', 'opq\n'])
-
- def test_rawio_write_through(self):
- # Issue #12591: with write_through=True, writes don't need a flush
- raw = self.MockRawIO([b'abc', b'def', b'ghi\njkl\nopq\n'])
- txt = self.TextIOWrapper(raw, encoding='ascii', newline='\n',
- write_through=True)
- txt.write('1')
- txt.write('23\n4')
- txt.write('5')
- self.assertEqual(b''.join(raw._write_stack), b'123\n45')
-
class CTextIOWrapperTest(TextIOWrapperTest):
def test_initialization(self):
« no previous file with comments | « Lib/test/test_ioctl.py ('k') | Lib/test/test_itertools.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+