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

Method test_peek

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

Source from the content-addressed store, hash-verified

2288 self.assertEqual(w._write_stack, [b"abc", b"def"])
2289
2290 def test_peek(self):
2291 pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO())
2292
2293 self.assertStartsWith(pair.peek(3), b"abc")
2294 self.assertEqual(pair.read(3), b"abc")
2295
2296 def test_readable(self):
2297 pair = self.tp(self.MockRawIO(), self.MockRawIO())

Callers

nothing calls this directly

Calls 4

assertStartsWithMethod · 0.45
peekMethod · 0.45
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected