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

Method test_buffered_reader

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

Source from the content-addressed store, hash-verified

249 gzip.GzipFile(self.filename, 'xb')
250
251 def test_buffered_reader(self):
252 # Issue #7471: a GzipFile can be wrapped in a BufferedReader for
253 # performance.
254 self.test_write()
255
256 with gzip.GzipFile(self.filename, 'rb') as f:
257 with io.BufferedReader(f) as r:
258 lines = [line for line in r]
259
260 self.assertEqual(lines, 50 * data1.splitlines(keepends=True))
261
262 def test_readline(self):
263 self.test_write()

Callers

nothing calls this directly

Calls 3

test_writeMethod · 0.95
assertEqualMethod · 0.45
splitlinesMethod · 0.45

Tested by

no test coverage detected