Skip to content

Commit

Permalink
Make ufunc test more robust for newer numpy versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mstimberg committed Jan 7, 2022
1 parent 8b4c558 commit 9adfb71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions brian2/tests/test_units.py
Expand Up @@ -989,12 +989,12 @@ def test_numpy_functions_logical():
try:
result = eval(f'np.{ufunc}(value1, "a string")')
assert result == NotImplemented
except TypeError:
except (ValueError, TypeError):
pass # raised on numpy >= 0.10
try:
result = eval(f'np.{ufunc}("a string", value1)')
assert result == NotImplemented
except TypeError:
except (ValueError, TypeError):
pass # raised on numpy >= 0.10
assert not isinstance(result_units, Quantity)
assert_equal(result_units, result_array)
Expand Down

0 comments on commit 9adfb71

Please sign in to comment.