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

Method test_roundtrip_level

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

Source from the content-addressed store, hash-verified

151 self.assertEqual(dat2, raw_dat)
152
153 def test_roundtrip_level(self):
154 raw_dat = THIS_FILE_BYTES[: len(THIS_FILE_BYTES) // 6]
155 level_min, level_max = CompressionParameter.compression_level.bounds()
156
157 for level in range(max(-20, level_min), level_max + 1):
158 dat1 = compress(raw_dat, level)
159 dat2 = decompress(dat1)
160 self.assertEqual(dat2, raw_dat)
161
162 def test_get_frame_info(self):
163 # no dict

Callers

nothing calls this directly

Calls 4

compressFunction · 0.90
decompressFunction · 0.90
boundsMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected