From 2ba8132b518e08c6b25e54df0a025cf9aa006f06 Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Tue, 8 Apr 2008 18:04:33 +0000 Subject: Fix test for assert* with nan values + string formatting issue when handling nan. --- numpy/testing/tests/test_utils.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'numpy/testing/tests/test_utils.py') diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py index 154c3f03e..48cd89cdd 100644 --- a/numpy/testing/tests/test_utils.py +++ b/numpy/testing/tests/test_utils.py @@ -90,11 +90,14 @@ class TestEqual(_GenericTest): foo(t) def test_nan_array(self): - """Test two arrays with different shapes are found not equal.""" - a = N.array([1, 2]) - b = N.array([[1, 2], [1, 2]]) + """Test arrays with nan values in them.""" + a = N.array([1, 2, N.nan]) + b = N.array([1, 2, N.nan]) - self._test_not_equal(a, b) + self._test_equal(a, b) + + c = N.array([1, 2, 3]) + self._test_not_equal(c, b) def test_string_arrays(self): """Test two arrays with different shapes are found not equal.""" -- cgit v1.2.1