contrib/python-zstandard/tests/test_compressor.py
raw| 1 | import unittest |
| 2 | |
| 3 | import zstandard as zstd |
| 4 | |
| 5 | |
| 6 | class TestCompressor(unittest.TestCase): |
| 7 | def test_level_bounds(self): |
| 8 | with self.assertRaises(ValueError): |
| 9 | zstd.ZstdCompressor(level=23) |
| 10 | |
| 11 | def test_memory_size(self): |
| 12 | cctx = zstd.ZstdCompressor(level=1) |
| 13 | self.assertGreater(cctx.memory_size(), 100) |