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

Method test_textio_readlines

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

Source from the content-addressed store, hash-verified

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