Skip to content

Commit

Permalink
Fix test to catch correct exception for latest numpy version
Browse files Browse the repository at this point in the history
  • Loading branch information
mstimberg committed Jun 24, 2021
1 parent d71837c commit 62fa449
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion brian2/tests/test_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ def test_numpy_functions_logical():
# one argument
result_units = eval('np.%s(value1)' % ufunc)
result_array = eval('np.%s(np.array(value1))' % ufunc)
except ValueError:
except (ValueError, TypeError):
# two arguments
result_units = eval('np.%s(value1, value2)' % ufunc)
result_array = eval('np.%s(np.array(value1), np.array(value2))' % ufunc)
Expand Down

0 comments on commit 62fa449

Please sign in to comment.