Closed Ali-Tehrani closed 9 months ago
Hi, I was looking at the tests you linked. I have a question, at the end of the for loops you highlighted the ==
is used. I think it gives back a boolean based on the elements that they are comparing. I know it doesn't use assert but wouldn't it count as an assertation too? Also, what are the two arrays you are comparing that give different results?
Thanks, while trying to answer your question, I've ended up figuring it out and fixing it. It should be in pull-request #151
Perfect! thanks. I'll close the issue then.
Describe the bug
While I was fixing up the linter complaints. It mentioned that two tests didn't have assertion statements in them. If I did add them I get an error where the two arrays are not close at all. I haven't looked into but thought I put an issue for it.
As you can see below, the two tests don't have the obvious
assert np.allclose(a, b)
statement to them. If I add this fix, the shape is correct but the error is very large.The first failed test is
test_compute_differential_operator_integrals_multiarray
intest_diff_operator_int.py
https://github.com/theochem/gbasis/blob/c8268710b77c706f02487e907339f904c12397c9/tests/test_diff_operator_int.py#L315-L328The second test is
test_compute_multipole_moment_integrals_multiarray
intest_moment_int.py
: https://github.com/theochem/gbasis/blob/c8268710b77c706f02487e907339f904c12397c9/tests/test_moment_int.py#L800-L814To Reproduce
pytest -v .
Additional context