diff --git a/test/test_gaunt.py b/test/test_gaunt.py index e33f7b97920f2aa37b6b2fe7d42d22b8477baff6..07e62cb2ce92b203ad797f015037b193a680bf98 100644 --- a/test/test_gaunt.py +++ b/test/test_gaunt.py @@ -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,