From b02521c5d8fb827b49f77c157f4ce7bf884dd1f6 Mon Sep 17 00:00:00 2001 From: Michael Odintsov Date: Tue, 28 Nov 2017 18:51:32 +0200 Subject: MAINT: Remove duplicate cond check from assert_array_compare We already in "if not cond" branch of code, we don't need to check it again --- numpy/testing/nose_tools/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'numpy/testing/nose_tools/utils.py') diff --git a/numpy/testing/nose_tools/utils.py b/numpy/testing/nose_tools/utils.py index 0b6fafc96..973e3bb4b 100644 --- a/numpy/testing/nose_tools/utils.py +++ b/numpy/testing/nose_tools/utils.py @@ -773,8 +773,7 @@ def assert_array_compare(comparison, x, y, err_msg='', verbose=True, + '\n(mismatch %s%%)' % (match,), verbose=verbose, header=header, names=('x', 'y'), precision=precision) - if not cond: - raise AssertionError(msg) + raise AssertionError(msg) except ValueError: import traceback efmt = traceback.format_exc() -- cgit v1.2.1