From 41c54dc9206c5f6e6de150a8ae55b03cd8809de0 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Sun, 3 May 2026 03:45:10 +0200 Subject: [PATCH] [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 --- fitsio/tests/test_image_compression_defaults.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(): -- 2.30.2