diff --git a/lib/iris/tests/unit/util/test__coord_regular.py b/lib/iris/tests/unit/util/test__coord_regular.py index e5141419ec..a5e9aca9ed 100644 --- a/lib/iris/tests/unit/util/test__coord_regular.py +++ b/lib/iris/tests/unit/util/test__coord_regular.py @@ -94,6 +94,18 @@ def test_irregular_points(self): self.assertEqual(exp_avdiff, result_avdiff) self.assertFalse(result) + def test_single_point(self): + lone_point = np.array([4]) + result_avdiff, result = points_step(lone_point) + self.assertTrue(np.isnan(result_avdiff)) + self.assertTrue(result) + + def test_no_points(self): + no_points = np.array([]) + result_avdiff, result = points_step(no_points) + self.assertTrue(np.isnan(result_avdiff)) + self.assertTrue(result) + if __name__ == "__main__": tests.main()