diff --git a/lib/iris/tests/unit/util/test_array_equal.py b/lib/iris/tests/unit/util/test_array_equal.py index 38b9652443..f63092587c 100644 --- a/lib/iris/tests/unit/util/test_array_equal.py +++ b/lib/iris/tests/unit/util/test_array_equal.py @@ -101,12 +101,15 @@ def test_string_arrays_0d_and_scalar(self): self.assertFalse(array_equal(array_a, "foobar.")) def test_nan_equality_nan_ne_nan(self): - array = np.array([1.0, np.nan, 2.0, np.nan, 3.0]) - self.assertFalse(array_equal(array, array)) + array_a = np.array([1.0, np.nan, 2.0, np.nan, 3.0]) + array_b = array_a.copy() + self.assertFalse(array_equal(array_a, array_a)) + self.assertFalse(array_equal(array_a, array_b)) def test_nan_equality_nan_naneq_nan(self): array_a = np.array([1.0, np.nan, 2.0, np.nan, 3.0]) array_b = np.array([1.0, np.nan, 2.0, np.nan, 3.0]) + self.assertTrue(array_equal(array_a, array_a, withnans=True)) self.assertTrue(array_equal(array_a, array_b, withnans=True)) def test_nan_equality_nan_nanne_a(self):