MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_write_101

Method test_write_101

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected