File: test_compressor.py

package info (click to toggle)
python-zstandard 0.24.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,912 kB
  • sloc: ansic: 42,099; python: 8,683; makefile: 22; sh: 14
file content (13 lines) | stat: -rw-r--r-- 333 bytes parent folder | download | duplicates (5)
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)