def helper_zstd_version_number(self): if self.ZSTD_EXTERNAL: # Python 2.6 unittest missing assertLessEqual self.failIf( self.VERSION_INT_MIN > zstd.ZSTD_version_number(), msg="PyZstd %s require external library version >= 1.0.0!" % zstd.version()) else: self.assertEqual(self.VERSION_INT, zstd.ZSTD_version_number())
def helper_compression_negative_level_notdefault(self): if zstd.ZSTD_version_number() < 10304: return raise_skip( "PyZstd was build with old version of ZSTD library (%s) without support of negative compression levels." % zstd.ZSTD_version()) CDATA = zstd.compress(tDATA, -1) self.assertNotEqual(CDATA, zstd.compress(tDATA, 0))
def helper_zstd_version_number(self): self.assertEqual(self.VERSION_INT, zstd.ZSTD_version_number())
def helper_zstd_version_number(self): if zstd.ZSTD_external(): return raise_skip( "PyZstd was build with external version of ZSTD library (%s). It can be any version. Almost." % zstd.ZSTD_version()) self.assertEqual(self.VERSION_INT, zstd.ZSTD_version_number())
def helper_zstd_version_number_min(self): self.assertFalse( self.VERSION_INT_MIN > zstd.ZSTD_version_number(), msg="PyZstd %s require external library version >= 1.0.0!" % zstd.version())