Skip to content

Commit

Permalink
change the assertion of the test_cube.py file to make the test correct.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinzyb committed Feb 21, 2024
1 parent 0e2879e commit 9f359df
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/test_cube/test_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,19 @@ def test_mav(self, cube_and_answer):
mav_answer = np.load(os.path.join(answer_dir, "mav.npy"))
mav_x_answer = mav_answer[0]
mav_answer = mav_answer[1]
assert np.all(mav == mav_answer)
assert np.all(mav_x == mav_x_answer)

np.testing.assert_almost_equal(mav,
mav_answer,
decimal=8,
err_msg = 'mav failed'
)
np.testing.assert_almost_equal(mav_x,
mav_x_answer,
decimal=8,
err_msg = 'mav_x failed'
)
#assert np.all(mav == mav_answer)
#assert np.all(mav_x == mav_x_answer)



Expand Down

0 comments on commit 9f359df

Please sign in to comment.