diff options
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/tests/test_umath.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/numpy/core/tests/test_umath.py b/numpy/core/tests/test_umath.py index 7bcec3114..56e7311e2 100644 --- a/numpy/core/tests/test_umath.py +++ b/numpy/core/tests/test_umath.py @@ -678,10 +678,9 @@ class TestMinMax(TestCase): for i in range(inp.size): inp[:] = np.arange(inp.size, dtype=dt) inp[i] = np.nan - self.assertTrue(np.isnan(inp.max()), - msg=repr(inp) + '\n' + msg) - self.assertTrue(np.isnan(inp.min()), - msg=repr(inp) + '\n' + msg) + emsg = lambda: '%r\n%s' % (inp, msg) + assert_(np.isnan(inp.max()), msg=emsg) + assert_(np.isnan(inp.min()), msg=emsg) inp[i] = 1e10 assert_equal(inp.max(), 1e10, err_msg=msg) |