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

Method test_readlines

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

Source from the content-addressed store, hash-verified

379 self.assertEqual(bm[n:], b'x' * (len(bm[n:])))
380
381 def test_readlines(self):
382 def bufio():
383 rawio = self.MockRawIO((b"abc\n", b"d\n", b"ef"))
384 return self.tp(rawio)
385 self.assertEqual(bufio().readlines(), [b"abc\n", b"d\n", b"ef"])
386 self.assertEqual(bufio().readlines(5), [b"abc\n", b"d\n"])
387 self.assertEqual(bufio().readlines(None), [b"abc\n", b"d\n", b"ef"])
388
389 def test_buffering(self):
390 data = b"abcdefghi"

Callers

nothing calls this directly

Calls 2

assertEqualMethod · 0.45
readlinesMethod · 0.45

Tested by

no test coverage detected