Commit 9b11f80b authored by Gordian Edenhofer's avatar Gordian Edenhofer
Browse files

test_einsum.py: Do not call pytest setup-functions

Plus, drop an unused variable.
parent 657e3f58
Pipeline #75020 passed with stages
in 26 minutes and 27 seconds
......@@ -24,7 +24,6 @@ from nifty6.extra import check_jacobian_consistency, consistency_check
import nifty6 as ift
from ..common import list2fixture, setup_function, teardown_function
pmp = pytest.mark.parametrize
spaces = (ift.UnstructuredDomain(4),
ift.RGSpace((3,2)),
ift.LMSpace(5),
......@@ -36,8 +35,6 @@ dtype = list2fixture([np.float64, np.complex128])
def test_linear_einsum_outer(space1, space2, dtype, n_invocations=10):
setup_function()
mf_dom = ift.MultiDomain.make(
{
"dom01": space1,
......@@ -65,12 +62,8 @@ def test_linear_einsum_outer(space1, space2, dtype, n_invocations=10):
r_adj = ift.from_random("normal", le.target, dtype=dtype)
assert_allclose(le.adjoint(r_adj).val, le_ift.adjoint(r_adj).val)
teardown_function()
def test_linear_einsum_contraction(space1, space2, dtype, n_invocations=10):
setup_function()
mf_dom = ift.MultiDomain.make(
{
"dom01": space1,
......@@ -98,14 +91,10 @@ def test_linear_einsum_contraction(space1, space2, dtype, n_invocations=10):
r_adj = ift.from_random("normal", le.target, dtype=dtype)
assert_allclose(le.adjoint(r_adj).val, le_ift.adjoint(r_adj).val)
teardown_function()
def test_multi_linear_einsum_outer(
space1, space2, dtype, n_invocations=10, ntries=100
):
setup_function()
mf_dom = ift.MultiDomain.make(
{
"dom01": space1,
......@@ -145,5 +134,3 @@ def test_multi_linear_einsum_outer(
mle_ift_j_val = mle_ift_rl.jac.adjoint(rj_adj).val
for k in mle_ift.domain.keys():
assert_allclose(mle_j_val[k], mle_ift_j_val[k])
teardown_function()
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