We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb5f648 commit 8a96f88Copy full SHA for 8a96f88
1 file changed
Lib/test/test_io/test_memoryio.py
@@ -616,8 +616,8 @@ def test_peek(self):
616
# Length greater than DEFAULT_BUFFER_SIZE
617
buf = self.buftype("1234567890" * io.DEFAULT_BUFFER_SIZE)
618
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)
+ self.assertEqual(memio.peek(), buf)
+ self.assertEqual(memio.peek(io.DEFAULT_BUFFER_SIZE + 100), buf[:io.DEFAULT_BUFFER_SIZE + 100])
621
622
# Current position beyond buffer end
623
0 commit comments