From 079d130effb45137430f8a5c6a76938effecc447 Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Wed, 20 Sep 2023 10:50:33 -0700 Subject: [PATCH] fix up --- tests/conftest.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 1771b98150..0d780f01cf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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") @@ -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(