Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typical error in unit tests #82

Closed
tovrstra opened this issue Jun 4, 2016 · 0 comments
Closed

Typical error in unit tests #82

tovrstra opened this issue Jun 4, 2016 · 0 comments
Assignees
Labels
Milestone

Comments

@tovrstra
Copy link
Member

tovrstra commented Jun 4, 2016

I just fixed on occurence of the following:

assert abs(obasis.con_coeffs - np.array([0.15432897, 0.53532814, 0.44463454])).all()

It is missing a .max(). Such checks pass even if there is a mismatch. It is better to use numpy.testing instead. In this case:

np.testing.assert_almost_equal(obasis.con_coeffs, [0.15432897, 0.53532814, 0.44463454])

We should at least fix all the cases where .max() was forgotten.

@tovrstra tovrstra added the QA label Jun 4, 2016
@tovrstra tovrstra added this to the 2.0.1 milestone Jun 4, 2016
@tovrstra tovrstra self-assigned this Jun 4, 2016
tovrstra added a commit to tovrstra/horton that referenced this issue Jun 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant