File cramjam-issue193-test_variants.patch of Package python-cramjam
Index: cramjam-2.11.0.post1/tests/test_variants.py
===================================================================
--- cramjam-2.11.0.post1.orig/tests/test_variants.py
+++ cramjam-2.11.0.post1/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,
@@ -181,7 +181,7 @@ 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,
@@ -191,9 +191,6 @@ def test_variants_decompress_into(
is_pypy,
is_free_threaded,
):
- 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)