File: test_extension.py

package info (click to toggle)
python-backports.zstd 1.3.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,056 kB
  • sloc: python: 18,504; ansic: 5,361; sh: 44; makefile: 18
file content (20 lines) | stat: -rw-r--r-- 545 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os
import unittest
from backports import zstd


@unittest.skipIf(
    os.environ.get("BACKPORTSZSTD_SKIP_EXTENSION_TEST") == "1",
    "BACKPORTSZSTD_SKIP_EXTENSION_TEST set",
)
class TestExtension(unittest.TestCase):
    def test_multithreading_support(self):
        self.assertFalse(zstd.CompressionParameter.nb_workers.bounds() == (0, 0))

    def test_zstd_version(self):
        self.assertEqual(zstd.zstd_version, "1.5.7")
        self.assertEqual(zstd.zstd_version_info, (1, 5, 7))


if __name__ == "__main__":
    unittest.main()