MCPcopy Index your code
hub / github.com/python/cpython / test_write_101

Method test_write_101

Lib/test/test_zstd.py:2176–2184  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 6

ZstdFileClass · 0.90
writeMethod · 0.45
compressMethod · 0.45
flushMethod · 0.45
assertEqualMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected