From 9de2d41b9ff1c37ad338f6e9c405b2fdc4a47451 Mon Sep 17 00:00:00 2001 From: Shannon Osborne Date: Thu, 13 Dec 2018 16:35:04 -0500 Subject: [PATCH] update test for floating pt tolerance --- poppy/tests/test_wfe.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/poppy/tests/test_wfe.py b/poppy/tests/test_wfe.py index e7318b40..9a0254dd 100644 --- a/poppy/tests/test_wfe.py +++ b/poppy/tests/test_wfe.py @@ -81,7 +81,5 @@ def test_ParameterizedAberration(): pd_wave *= pupil pd_wave *= parameterized_distortion - stddev = np.std(pd_wave.phase - zern_wave.phase) - - assert stddev < 1e-16, ("ParameterizedAberration disagrees with " - "ZernikeAberration! stddev {}".format(stddev)) + np.testing.assert_allclose(pd_wave.phase, zern_wave.phase, + err_msg="ParameterizedAberration disagrees with ZernikeAberration")