From 3b2cac84740318b1944fad52b7e75ea29c7243ca Mon Sep 17 00:00:00 2001 From: Ryan May Date: Thu, 9 Nov 2023 17:26:39 -0700 Subject: [PATCH] TST: Silence some invalid value warnings These are inevitable when you do mod/remainder on a nan, but we're perfectly happy to get nan back. --- tests/calc/test_calc_tools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/calc/test_calc_tools.py b/tests/calc/test_calc_tools.py index 6f5b8a3c28a..b351372bf32 100644 --- a/tests/calc/test_calc_tools.py +++ b/tests/calc/test_calc_tools.py @@ -884,6 +884,7 @@ def test_angle_to_direction_full(): assert_array_equal(output_dirs, expected_dirs) +@pytest.mark.filterwarnings('ignore:invalid value encountered in remainder:RuntimeWarning') def test_angle_to_direction_invalid_scalar(): """Test invalid angle.""" expected_dirs = UND @@ -891,6 +892,7 @@ def test_angle_to_direction_invalid_scalar(): assert_array_equal(output_dirs, expected_dirs) +@pytest.mark.filterwarnings('ignore:invalid value encountered in remainder:RuntimeWarning') def test_angle_to_direction_invalid_arr(): """Test array of invalid angles.""" expected_dirs = ['NE', UND, UND, UND, 'N']