(self)
| 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() |
nothing calls this directly
no test coverage detected