diff options
author | Michael Odintsov <michael@datarobot.com> | 2017-11-28 18:51:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-28 18:51:32 +0200 |
commit | b02521c5d8fb827b49f77c157f4ce7bf884dd1f6 (patch) | |
tree | fdf812e647d9e1d63e1782d86f60db7ec2278125 /numpy/testing/nose_tools/utils.py | |
parent | d7983b11080126aa59cf002a9abd20f7cb47a0bc (diff) | |
download | numpy-b02521c5d8fb827b49f77c157f4ce7bf884dd1f6.tar.gz |
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
Diffstat (limited to 'numpy/testing/nose_tools/utils.py')
-rw-r--r-- | numpy/testing/nose_tools/utils.py | 3 |
1 files changed, 1 insertions, 2 deletions
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() |