File: test_compressor.py

package info (click to toggle)
python-zstandard 0.25.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,052 kB
  • sloc: ansic: 43,739; python: 8,712; makefile: 23; sh: 2
file content (13 lines) | stat: -rw-r--r-- 333 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
import unittest

import zstandard as zstd


class TestCompressor(unittest.TestCase):
    def test_level_bounds(self):
        with self.assertRaises(ValueError):
            zstd.ZstdCompressor(level=23)

    def test_memory_size(self):
        cctx = zstd.ZstdCompressor(level=1)
        self.assertGreater(cctx.memory_size(), 100)