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

Method test_init

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

Source from the content-addressed store, hash-verified

1554 self.FRAME_42 = compress(self.DECOMPRESSED_42)
1555
1556 def test_init(self):
1557 with ZstdFile(io.BytesIO(COMPRESSED_100_PLUS_32KB)) as f:
1558 pass
1559 with ZstdFile(io.BytesIO(), "w") as f:
1560 pass
1561 with ZstdFile(io.BytesIO(), "x") as f:
1562 pass
1563 with ZstdFile(io.BytesIO(), "a") as f:
1564 pass
1565
1566 with ZstdFile(io.BytesIO(), "w", level=12) as f:
1567 pass
1568 with ZstdFile(io.BytesIO(), "w", options={CompressionParameter.checksum_flag:1}) as f:
1569 pass
1570 with ZstdFile(io.BytesIO(), "w", options={}) as f:
1571 pass
1572 with ZstdFile(io.BytesIO(), "w", level=20, zstd_dict=TRAINED_DICT) as f:
1573 pass
1574
1575 with ZstdFile(io.BytesIO(), "r", options={DecompressionParameter.window_log_max:25}) as f:
1576 pass
1577 with ZstdFile(io.BytesIO(), "r", options={}, zstd_dict=TRAINED_DICT) as f:
1578 pass
1579
1580 def test_init_with_PathLike_filename(self):
1581 with tempfile.NamedTemporaryFile(delete=False) as tmp_f:

Callers

nothing calls this directly

Calls 1

ZstdFileClass · 0.90

Tested by

no test coverage detected