Skip to content

Commit

Permalink
TST: Silence some invalid value warnings
Browse files Browse the repository at this point in the history
These are inevitable when you do mod/remainder on a nan, but we're
perfectly happy to get nan back.
  • Loading branch information
dopplershift committed Nov 10, 2023
1 parent 3a6cfd3 commit 3b2cac8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/calc/test_calc_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,13 +884,15 @@ 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
output_dirs = angle_to_direction(None)
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']
Expand Down

0 comments on commit 3b2cac8

Please sign in to comment.