diff --git a/skais/tests/ais/test_ais_points.py b/skais/tests/ais/test_ais_points.py index 330f039bd69e5c734480f6ed8bd6a687737364e4..5930a9c853330f2c8bb1d5939d33d0320385a7cc 100644 --- a/skais/tests/ais/test_ais_points.py +++ b/skais/tests/ais/test_ais_points.py @@ -216,6 +216,40 @@ class TestAISPositions(unittest.TestCase): pd.testing.assert_frame_equal(expected.reset_index(drop=True), result.reset_index(drop=True), check_exact=False, rtol=0.05) + def test_normalize_wrong_arguments_1(self): + ais_points = AISPoints(pd.DataFrame( + { + "cog": [i for i in range(0, 359, 10)], + "heading": [180 for _ in range(0, 359, 10)] + } + ) + ) + + with self.assertRaises(ValueError): + ais_points.normalize(normalization_dict=None) + + def test_normalize_wrong_arguments_2(self): + ais_points = AISPoints(pd.DataFrame( + { + "cog": [i for i in range(0, 359, 10)], + "heading": [180 for _ in range(0, 359, 10)] + } + ) + ) + with self.assertRaises(ValueError): + ais_points.normalize(normalization_dict=10) + + def test_normalize_wrong_arguments_3(self): + ais_points = AISPoints(pd.DataFrame( + { + "cog": [i for i in range(0, 359, 10)], + "heading": [180 for _ in range(0, 359, 10)] + } + ) + ) + with self.assertRaises(ValueError): + ais_points.normalize(normalization_dict=[0, 1, 2, 3, 4]) + def test_compute_drift(self): ais_points = AISPoints(pd.DataFrame( {