Skip to content

[BUG] Test doesn't assert or fails when fixed (Diff Operator Integrals and Moment integral) #152

@Ali-Tehrani

Description

@Ali-Tehrani

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 in test_diff_operator_int.py

for k, angmom_b in enumerate(angmoms_b):
_compute_differential_operator_integrals(
np.array([order_diff]),
coord_a,
np.array([angmom_a]),
exps_a,
coeffs_a,
norm_a,
coord_b,
np.array([angmom_b]),
exps_b,
coeffs_b,
norm_b,
) == test[i, 0, j, 0, k]

The second test is test_compute_multipole_moment_integrals_multiarray in test_moment_int.py:

for k, angmom_b in enumerate(angmoms_b):
_compute_multipole_moment_integrals(
coord_moment,
np.array([order_moment]),
coord_a,
np.array([angmom_a]),
exps_a,
coeffs_a,
norm_a,
coord_b,
np.array([angmom_b]),
exps_b,
coeffs_b,
norm_b,
) == test[i, 0, j, 0, k]

To Reproduce

pytest -v .

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions