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

Method test_peek

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

Source from the content-addressed store, hash-verified

1097 self.assertEqual(w._write_stack, [b"abc", b"def"])
1098
1099 def test_peek(self):
1100 pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO())
1101
1102 self.assertStartsWith(pair.peek(3), b"abc")
1103 self.assertEqual(pair.read(3), b"abc")
1104
1105 def test_readable(self):
1106 pair = self.tp(self.MockRawIO(), self.MockRawIO())

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected