diff options
Diffstat (limited to 'dev-python/pyfits/files/03-fix-for-cfitsio-3380.patch')
-rw-r--r-- | dev-python/pyfits/files/03-fix-for-cfitsio-3380.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/dev-python/pyfits/files/03-fix-for-cfitsio-3380.patch b/dev-python/pyfits/files/03-fix-for-cfitsio-3380.patch new file mode 100644 index 000000000000..d0fac84d1e22 --- /dev/null +++ b/dev-python/pyfits/files/03-fix-for-cfitsio-3380.patch @@ -0,0 +1,43 @@ +Author: Ole Streicher <olebole@debian.org> +Description: Update image tests for cfitsio 3.380 + Make TFORMx check more flexible. The maximal column length in cfitsio + changed between version 3370 and 3380. This patch checks their syntax, + without a specific length. + . + HCOMPRESSed images are allowed to deviate from the original by about + 1/quantize_level of the RMS in each tile. This patch changes the absolute + identity test +Bug: https://github.com/astropy/astropy/issues/4646 +Bug: https://github.com/astropy/astropy/issues/4647 +Bug-Debian: https://bugs.debian.org/816595 +--- a/pyfits/tests/test_image.py ++++ b/pyfits/tests/test_image.py +@@ -2,6 +2,7 @@ + + import math + import os ++import re + import time + import warnings + +@@ -1014,7 +1015,7 @@ + hdu.writeto(self.temp('test.fits')) + + with fits.open(self.temp('test.fits')) as hdul: +- assert (hdul['SCI'].data == cube).all() ++ assert np.abs(hdul['SCI'].data - cube).max() < 1./15. + + def test_subtractive_dither_seed(self): + """ +@@ -1269,8 +1270,8 @@ + + with fits.open(self.temp('test.fits'), + disable_image_compression=True) as h: +- assert h[1].header['TFORM1'] == '1PB(30)' +- assert h[1].header['TFORM2'] == '1PB(359)' ++ assert re.match(r'^1PB\(\d+\)$', h[1].header['TFORM1']) ++ assert re.match(r'^1PB\(\d+\)$', h[1].header['TFORM2']) + + def test_compression_update_header(self): + """Regression test for + |