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

Method test_file_prefix

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

Source from the content-addressed store, hash-verified

2345 self.assertEqual(dat, SAMPLES[0])
2346
2347 def test_file_prefix(self):
2348 bi = io.BytesIO()
2349 with ZstdFile(bi, 'w', zstd_dict=TRAINED_DICT.as_prefix) as f:
2350 f.write(SAMPLES[0])
2351 bi.seek(0)
2352 with ZstdFile(bi, zstd_dict=TRAINED_DICT.as_prefix) as f:
2353 dat = f.read()
2354 self.assertEqual(dat, SAMPLES[0])
2355
2356 def test_UnsupportedOperation(self):
2357 # 1

Callers

nothing calls this directly

Calls 5

seekMethod · 0.95
ZstdFileClass · 0.90
writeMethod · 0.45
readMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected