From 0c4d745208235d4045ba16ceb93991b9ab3ac8a6 Mon Sep 17 00:00:00 2001 From: Mattia Verga Date: Wed, 20 Sep 2023 18:37:41 +0200 Subject: [PATCH] Add tolerance in test comparison Signed-off-by: Mattia Verga --- tests/test_ongc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_ongc.py b/tests/test_ongc.py index ae7cac3..e153882 100644 --- a/tests/test_ongc.py +++ b/tests/test_ongc.py @@ -461,7 +461,7 @@ def test_get_separation_raw(self): obj2 = ongc.Dso('NGC6118') expected = (4.207483963913541, 2.9580416666666864, -2.9927499999999996) - assert ongc.getSeparation(obj1, obj2) == expected + np.testing.assert_allclose(ongc.getSeparation(obj1, obj2), expected) def test_get_separation_friendly(self): """Test that the calculated apparent angular separation between two objects