forked from pool/python-cramjam
- Update to 2.9.1 * Add Cargo.lock and bump patch version by @milesgranger in #192 - Release 2.9.0 * Bump libcramjam/isal-rs by @milesgranger in #183 * Add cramjam.zlib, cramjam.experimental.izlib, and cramjam.experimental.ideflate by @milesgranger in #184 - Release 2.8.4 * Add cramjam.experimental.blosc2 * Add cramjam.experimental.igzip (on 64bit targets) * Add wasm32 emscripten build and test for pyodide - Release 2.8.3 * Move LZMA / XZ out of experimental to xz submodule by @milesgranger in #133 * Remove unused Cargo.lock files by @milesgranger in #149 * Fix tests that assume C char is signed by @musicinmybrain in #150 - Release 2.8.2 * Remove zstd-safe dep in libcramjam by @milesgranger in #132 * Remove relative libcramjam dep for python builds by @milesgranger in #131 * Impl eq for python Buffer by @milesgranger in #135 * Fix missing LICENSE file in cramjam-cli by @musicinmybrain in #137 * Adjust the binary name in the cramjam-cli example by @musicinmybrain in #138 * Cargo.toml: set workspace.resolver to 2 by @veprbl in #140 - Add cramjam-opensuse-config.patch: Use some system libraries and avoid static linking - Add cramjam-issue193-test_variants.patch gh#milesgranger/cramjam#193 OBS-URL: https://build.opensuse.org/request/show/1231917 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cramjam?expand=0&rev=13
29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
Index: cramjam-2.9.1/tests/test_variants.py
|
|
===================================================================
|
|
--- cramjam-2.9.1.orig/tests/test_variants.py
|
|
+++ cramjam-2.9.1/tests/test_variants.py
|
|
@@ -104,7 +104,7 @@ def test_variants_raise_exception(varian
|
|
"output_type", (bytes, bytearray, "numpy", cramjam.Buffer, cramjam.File, memoryview)
|
|
)
|
|
@pytest.mark.parametrize("variant_str", VARIANTS)
|
|
-@given(raw_data=st.binary())
|
|
+@given(raw_data=st.binary(min_size=2))
|
|
def test_variants_compress_into(
|
|
variant_str, input_type, output_type, raw_data, tmp_path_factory, is_pypy
|
|
):
|
|
@@ -174,13 +174,10 @@ def test_variants_compress_into(
|
|
"output_type", (bytes, bytearray, "numpy", cramjam.Buffer, cramjam.File, memoryview)
|
|
)
|
|
@pytest.mark.parametrize("variant_str", VARIANTS)
|
|
-@given(raw_data=st.binary())
|
|
+@given(raw_data=st.binary(min_size=2))
|
|
def test_variants_decompress_into(
|
|
variant_str, input_type, output_type, tmp_path_factory, raw_data, is_pypy
|
|
):
|
|
- if variant_str == "izlib" and output_type == "memoryview":
|
|
- pytest.skip("See issue https://github.com/milesgranger/cramjam/issues/193")
|
|
-
|
|
variant = getattr(cramjam, variant_str)
|
|
|
|
compressed = variant.compress(raw_data)
|