(self)
| 2174 | self.assertEqual(f._fp.tell(), 0) |
| 2175 | |
| 2176 | def test_write_101(self): |
| 2177 | with io.BytesIO() as dst: |
| 2178 | with ZstdFile(dst, "w") as f: |
| 2179 | for start in range(0, len(THIS_FILE_BYTES), 101): |
| 2180 | f.write(THIS_FILE_BYTES[start:start+101]) |
| 2181 | |
| 2182 | comp = ZstdCompressor() |
| 2183 | expected = comp.compress(THIS_FILE_BYTES) + comp.flush() |
| 2184 | self.assertEqual(dst.getvalue(), expected) |
| 2185 | |
| 2186 | def test_write_append(self): |
| 2187 | def comp(data): |