Skip to content

Commit 8a96f88

Browse files
committed
Test buffer content
1 parent bb5f648 commit 8a96f88

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_io/test_memoryio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,8 +616,8 @@ def test_peek(self):
616616
# Length greater than DEFAULT_BUFFER_SIZE
617617
buf = self.buftype("1234567890" * io.DEFAULT_BUFFER_SIZE)
618618
with self.ioclass(buf) as memio:
619-
self.assertEqual(len(memio.peek()), len(buf))
620-
self.assertEqual(len(memio.peek(io.DEFAULT_BUFFER_SIZE + 100)), io.DEFAULT_BUFFER_SIZE + 100)
619+
self.assertEqual(memio.peek(), buf)
620+
self.assertEqual(memio.peek(io.DEFAULT_BUFFER_SIZE + 100), buf[:io.DEFAULT_BUFFER_SIZE + 100])
621621

622622
# Current position beyond buffer end
623623
with self.ioclass(buf) as memio:

0 commit comments

Comments
 (0)