From: Aurelien Jarno Date: Sun, 3 May 2026 01:45:10 +0000 (+0200) Subject: [PATCH] test_compression_diskfile_kwargs: support both RICE_ONE and RICE_1 (#491) X-Git-Tag: archive/raspbian/1.3.0+ds-2+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=41c54dc9206c5f6e6de150a8ae55b03cd8809de0;p=python-fitsio.git [PATCH] test_compression_diskfile_kwargs: support both RICE_ONE and RICE_1 (#491) Starting with CFITSIO 4.6.4, commit 7d854ef29a4c ("Stop writing RICE_ONE as an alias for RICE_1."), the ZCMPTYPE header returns RICE_1 instead of RICE_ONE, breaking the test_compression_diskfile_kwargs test. Update it to accept both values to maintain compatibility across CFITSIO versions. Gbp-Pq: Name test_compression_diskfile_kwargs-support-both-RICE_O.patch --- diff --git a/fitsio/tests/test_image_compression_defaults.py b/fitsio/tests/test_image_compression_defaults.py index c7ee03e..c927be3 100644 --- a/fitsio/tests/test_image_compression_defaults.py +++ b/fitsio/tests/test_image_compression_defaults.py @@ -37,9 +37,10 @@ def test_compression_diskfile_kwargs(): ('ZTILE2', 10), ('ZQUANTIZ', 'SUBTRACTIVE_DITHER_2'), ('ZDITHER0', 42), - ('ZCMPTYPE', 'RICE_ONE'), ]: assert hdr[key] == val + # Starting with cfitsio 4.6.4, RICE_1 is returned instead of RICE_ONE + assert hdr['ZCMPTYPE'] in ('RICE_ONE', 'RICE_1') def test_compression_efns():