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

Method test_readlines

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

Source from the content-addressed store, hash-verified

3416 self.assertEqual(reads, "AA\nBB")
3417
3418 def test_readlines(self):
3419 txt = self.TextIOWrapper(self.BytesIO(b"AA\nBB\nCC"), encoding="utf-8")
3420 self.assertEqual(txt.readlines(), ["AA\n", "BB\n", "CC"])
3421 txt.seek(0)
3422 self.assertEqual(txt.readlines(None), ["AA\n", "BB\n", "CC"])
3423 txt.seek(0)
3424 self.assertEqual(txt.readlines(5), ["AA\n", "BB\n"])
3425
3426 # read in amounts equal to TextIOWrapper._CHUNK_SIZE which is 128.
3427 def test_read_by_chunk(self):

Callers

nothing calls this directly

Calls 3

seekMethod · 0.95
assertEqualMethod · 0.45
readlinesMethod · 0.45

Tested by

no test coverage detected