MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_flush_and_peek

Method test_flush_and_peek

Lib/test/test_io.py:2493–2502  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2491 self.check_flush_and_read(_readinto)
2492
2493 def test_flush_and_peek(self):
2494 def _peek(bufio, n=-1):
2495 # This relies on the fact that the buffer can contain the whole
2496 # raw stream, otherwise peek() can return less.
2497 b = bufio.peek(n)
2498 if n != -1:
2499 b = b[:n]
2500 bufio.seek(len(b), 1)
2501 return b
2502 self.check_flush_and_read(_peek)
2503
2504 def test_flush_and_write(self):
2505 raw = self.BytesIO(b"abcdefghi")

Callers

nothing calls this directly

Calls 1

check_flush_and_readMethod · 0.95

Tested by

no test coverage detected