Skip to content

Commit 4395333

Browse files
committed
Ensure atol is passed to FITSDiff
1 parent d59197b commit 4395333

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pytest_arraydiff/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ def compare(cls, reference_file, test_file, atol=None, rtol=None):
116116
from astropy.io.fits.diff import FITSDiff
117117
from astropy.utils.introspection import minversion
118118
if minversion(astropy, '2.0'):
119-
diff = FITSDiff(reference_file, test_file, rtol=rtol)
119+
diff = FITSDiff(reference_file, test_file, rtol=rtol, atol=atol)
120120
else:
121+
# `atol` is not supported prior to Astropy 2.0
121122
diff = FITSDiff(reference_file, test_file, tolerance=rtol)
122123
return diff.identical, diff.report()
123124

0 commit comments

Comments
 (0)