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

Method test_textio_readlines

Lib/test/test_gzip.py:503–509  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

501 self.assertEqual(nread, len(uncompressed))
502
503 def test_textio_readlines(self):
504 # Issue #10791: TextIOWrapper.readlines() fails when wrapping GzipFile.
505 lines = (data1 * 50).decode("ascii").splitlines(keepends=True)
506 self.test_write()
507 with gzip.GzipFile(self.filename, 'r') as f:
508 with io.TextIOWrapper(f, encoding="ascii") as t:
509 self.assertEqual(t.readlines(), lines)
510
511 def test_fileobj_with_name(self):
512 with open(self.filename, "xb") as raw:

Callers

nothing calls this directly

Calls 5

test_writeMethod · 0.95
splitlinesMethod · 0.45
decodeMethod · 0.45
assertEqualMethod · 0.45
readlinesMethod · 0.45

Tested by

no test coverage detected