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