MCPcopy Index your code
hub / github.com/python/cpython / test_flush_and_peek

Method test_flush_and_peek

Lib/test/test_io/test_bufferedio.py:1303–1312  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1301 self.check_flush_and_read(_readinto)
1302
1303 def test_flush_and_peek(self):
1304 def _peek(bufio, n=-1):
1305 # This relies on the fact that the buffer can contain the whole
1306 # raw stream, otherwise peek() can return less.
1307 b = bufio.peek(n)
1308 if n != -1:
1309 b = b[:n]
1310 bufio.seek(len(b), 1)
1311 return b
1312 self.check_flush_and_read(_peek)
1313
1314 def test_flush_and_write(self):
1315 raw = self.BytesIO(b"abcdefghi")

Callers

nothing calls this directly

Calls 1

check_flush_and_readMethod · 0.95

Tested by

no test coverage detected