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

Method test_file_prefix

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

Source from the content-addressed store, hash-verified

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