mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 07:02:11 +00:00
check(): Stricter check in tests
Previous version would give false 'OK' if, for example, we were supposed to get [1, 2, 3] but instead got [2, 1, 3].
This commit is contained in:
parent
676e29885b
commit
150a0fa786
@ -22,7 +22,7 @@ ref = np.array(
|
||||
|
||||
|
||||
def check(mat):
|
||||
return 'OK' if np.sum(mat - ref) == 0 else 'NOT OK'
|
||||
return 'OK' if np.sum(abs(mat - ref)) == 0 else 'NOT OK'
|
||||
|
||||
print("should_give_NOT_OK = %s" % check(ref[:, ::-1]))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user