Skip to content

Commit

Permalink
fix up
Browse files Browse the repository at this point in the history
  • Loading branch information
kratsg authored and matthewfeickert committed Sep 27, 2023
1 parent 973085d commit e4d0290
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def backend(request):

if disable_backend:
pytest.skip(
f"skipping {func_name} as the backend is disabled: {request.config.option.disable_backend}"
f"skipping {func_name} as the backend is disabled via --disable-backend"
)
elif skip_backend:
pytest.skip(f"skipping {func_name} as specified")
Expand All @@ -127,10 +127,14 @@ def backend(request):
pytest.mark.xfail(reason=f"expect {func_name} to fail as specified")
)

tensor_config, optimizer_config = request.param

tensor = getattr(pyhf.tensor, tensor_config[0])(**tensor_config[1])
optimizer = getattr(pyhf.optimize, optimizer_config[0])(**optimizer_config[1])
# actual execution here, after all checks is done
pyhf.set_backend(*request.param)
pyhf.set_backend(tensor, optimizer)

yield request.param
yield (tensor, optimizer)


@pytest.fixture(
Expand Down

0 comments on commit e4d0290

Please sign in to comment.