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

Method test_option

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

Source from the content-addressed store, hash-verified

2564 os.remove(TESTFN)
2565
2566 def test_option(self):
2567 options = {DecompressionParameter.window_log_max:25}
2568 with open(io.BytesIO(COMPRESSED_100_PLUS_32KB), "rb", options=options) as f:
2569 self.assertEqual(f.read(), DECOMPRESSED_100_PLUS_32KB)
2570
2571 options = {CompressionParameter.compression_level:12}
2572 with io.BytesIO() as bio:
2573 with open(bio, "wb", options=options) as f:
2574 f.write(DECOMPRESSED_100_PLUS_32KB)
2575 file_data = decompress(bio.getvalue())
2576 self.assertEqual(file_data, DECOMPRESSED_100_PLUS_32KB)
2577
2578 def test_encoding(self):
2579 uncompressed = THIS_FILE_STR.replace(os.linesep, "\n")

Callers

nothing calls this directly

Calls 6

openFunction · 0.90
decompressFunction · 0.90
assertEqualMethod · 0.45
readMethod · 0.45
writeMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected