(self)
| 145 | self.assertEqual(b''.join(blocks), data1 * 50) |
| 146 | |
| 147 | def test_readinto(self): |
| 148 | # 10MB of uncompressible data to ensure multiple reads |
| 149 | large_data = os.urandom(10 * 2**20) |
| 150 | with gzip.GzipFile(self.filename, 'wb') as f: |
| 151 | f.write(large_data) |
| 152 | |
| 153 | buf = bytearray(len(large_data)) |
| 154 | with gzip.GzipFile(self.filename, 'r') as f: |
| 155 | nbytes = f.readinto(buf) |
| 156 | self.assertEqual(nbytes, len(large_data)) |
| 157 | self.assertEqual(buf, large_data) |
| 158 | |
| 159 | def test_readinto1(self): |
| 160 | # 10MB of uncompressible data to ensure multiple reads |
nothing calls this directly
no test coverage detected