simple_fixture¶
-
odl.util.testutils.
simple_fixture
(name, params, fmt=None)[source]¶ Helper to create a pytest fixture using only name and params.
- Parameters
- namestr
Name of the parameters used for the
ids
argument topytest.fixture
.- paramssequence
Values to be taken as parameters in the fixture. They are used as
params
argument to_pytest.fixtures.fixture
. Arguments wrapped in apytest.skipif
decorator are unwrapped for the generation of the test IDs.- fmtstr, optional
Use this format string for the generation of the
ids
. For each value, the id string is generated asfmt.format(name=name, value=value)
hence the format string must use
{name}
and{value}
. Default format strings are:" {name}='{value}' "
for string parameters," {name}={value} "
for other types.