From c6fc990613b9043769b7720a61d484bd0a5c1196 Mon Sep 17 00:00:00 2001 From: prototypezero46 Date: Thu, 26 Feb 2026 01:55:25 +0530 Subject: [PATCH] Update test_utils.py --- tests/test_utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_utils.py b/tests/test_utils.py index 236c8b26..77060cb0 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -186,3 +186,12 @@ def test_find_coord_index_out_of_range(start_coord, end_coord, not_in_array): error_message = 'Coordinate not in array: ' assert error_message in str(excinfo.value) + +def test_speed_conversion_roundtrip(): + speeds_knots = [0, 5, 10, 25, 100] + + for speed in speeds_knots: + mps = unit.knots_to_mps(speed) + knots_back = unit.mps_to_knots(mps) + + assert np.isclose(knots_back, speed, atol=1e-5)