summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-11-20 17:24:04 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-11-20 17:24:04 (GMT)
commitfa73555cfc414baff62ed41e0c8c2c85b167495a (patch)
treefd4efeef1167a060ecad62f74fc45260a5d19239 /Lib/test
parent6bcfadec07e1ac901f7ea3777db623731c4e6f58 (diff)
downloadcpython-fa73555cfc414baff62ed41e0c8c2c85b167495a.zip
cpython-fa73555cfc414baff62ed41e0c8c2c85b167495a.tar.gz
cpython-fa73555cfc414baff62ed41e0c8c2c85b167495a.tar.bz2
correct logic when pos is after the string #10467
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_memoryio.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py
index dcf6d51..13d7e17 100644
--- a/Lib/test/test_memoryio.py
+++ b/Lib/test/test_memoryio.py
@@ -452,6 +452,11 @@ class PyBytesIOTest(MemoryTestMixin, MemorySeekTestMixin,
self.assertEqual(a.tobytes(), b"1234567890d")
memio.close()
self.assertRaises(ValueError, memio.readinto, b)
+ memio = self.ioclass(b"123")
+ b = bytearray()
+ memio.seek(42)
+ memio.readinto(b)
+ self.assertEqual(b, b"")
def test_relative_seek(self):
buf = self.buftype("1234567890")