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

Method test_buffered_reader

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

Source from the content-addressed store, hash-verified

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