From 4d9af0a41784812d113cc00d5def2032009500c8 Mon Sep 17 00:00:00 2001 From: Marshall Perrin Date: Fri, 22 Nov 2024 16:02:30 -0500 Subject: [PATCH] switch a float comparison to allclose for robustness --- webbpsf/tests/test_detectors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webbpsf/tests/test_detectors.py b/webbpsf/tests/test_detectors.py index bff7e9fd..72c7315e 100644 --- a/webbpsf/tests/test_detectors.py +++ b/webbpsf/tests/test_detectors.py @@ -195,7 +195,7 @@ def test_ipc_basic_effect_on_psf_fwhm(): for extname in ['OVERSAMP', 'DET_SAMP']: fwhm_ipc = poppy.measure_fwhm(psf_withipc, ext=extname) fwhm_noipc = poppy.measure_fwhm(psf_noipc, ext=extname) - assert fwhm_ipc == fwhm_noipc, f'Adding IPC should not have any effect on the {extname} data.' + assert np.isclose(fwhm_ipc, fwhm_noipc), f'Adding IPC should not have any effect on the {extname} data.' print(f'test ok for {extname}') for extname in ['OVERDIST', 'DET_DIST']: