diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-06-08 06:18:12 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-06-08 06:18:12 (GMT) |
commit | 4fb01ffe663774518a1a6e6f068bd46804fd0a46 (patch) | |
tree | fe5f09a0953b1ab319050134e347bca3049d3a7c /Lib/test/test_io.py | |
parent | eac219436c0503968b47b7e316a2c1a72ed823f7 (diff) | |
download | cpython-4fb01ffe663774518a1a6e6f068bd46804fd0a46.zip cpython-4fb01ffe663774518a1a6e6f068bd46804fd0a46.tar.gz cpython-4fb01ffe663774518a1a6e6f068bd46804fd0a46.tar.bz2 |
backout 0fb7789b5eeb for test breakage (#20578)
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r-- | Lib/test/test_io.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index ee6db48..347832d 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -911,29 +911,6 @@ class BufferedReaderTest(unittest.TestCase, CommonBufferedTests): self.assertEqual(bufio.readinto(b), 1) self.assertEqual(b, b"cb") - def test_readinto1(self): - buffer_size = 10 - rawio = self.MockRawIO((b"abc", b"de", b"fgh", b"jkl")) - bufio = self.tp(rawio, buffer_size=buffer_size) - b = bytearray(2) - self.assertEqual(bufio.peek(3), b'abc') - self.assertEqual(rawio._reads, 1) - self.assertEqual(bufio.readinto1(b), 2) - self.assertEqual(b, b"ab") - self.assertEqual(rawio._reads, 1) - self.assertEqual(bufio.readinto1(b), 1) - self.assertEqual(b[:1], b"c") - self.assertEqual(rawio._reads, 1) - self.assertEqual(bufio.readinto1(b), 2) - self.assertEqual(b, b"de") - self.assertEqual(rawio._reads, 2) - b = bytearray(2*buffer_size) - self.assertEqual(bufio.peek(3), b'fgh') - self.assertEqual(rawio._reads, 3) - self.assertEqual(bufio.readinto1(b), 6) - self.assertEqual(b[:6], b"fghjkl") - self.assertEqual(rawio._reads, 4) - def test_readlines(self): def bufio(): rawio = self.MockRawIO((b"abc\n", b"d\n", b"ef")) @@ -3008,8 +2985,6 @@ class MiscIOTest(unittest.TestCase): self.assertRaises(ValueError, f.readall) if hasattr(f, "readinto"): self.assertRaises(ValueError, f.readinto, bytearray(1024)) - if hasattr(f, "readinto1"): - self.assertRaises(ValueError, f.readinto1, bytearray(1024)) self.assertRaises(ValueError, f.readline) self.assertRaises(ValueError, f.readlines) self.assertRaises(ValueError, f.seek, 0) |