Verified Commit 52cb6bfa authored by Chris Kerr's avatar Chris Kerr

Don't check the sign when the value is zero

parent c000193c
......@@ -56,8 +56,10 @@ def test_sympy_gaunt_vs_wigner(lmkp):
def test_python_vs_sympy_gaunt2(lmkp):
L, M, K, P = lmkp
sympy_result = sympy_matrix_element_G(L, M, K, P)
sympy_sign = sympy.sign(sympy_result)
python_result, sign = gaunt._modified_gaunt_squared(L, K, P, M)
assert sign == sympy.sign(sympy_result)
if sympy_sign != 0:
assert sign == sympy_sign
assert_sympy_equal(
python_result,
sympy_result ** 2,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment