-
I have a test helper which I implemented using a fixture so that this helper can also use other fixtures ( # in conftest.py
@pytest.fixture(scope="function")
def helper(make_foo, make_bar) -> callable:
def _helper(param1: str, param2: str):
assert False
return _helper
# in test_foo.py
@pytest.mark.parametrize("param1", ["a", "b"])
@pytest.mark.parametrize("param2", ["c", "d"])
def test_foo(helper, param1, param2):
helper(param1, param2) This is of course a dummy example as my helper uses more than 10 fixtures. The problem is that even though I register Is rewriting assertions in closure functions supported by pytest? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Ok, nevermind.
|
Beta Was this translation helpful? Give feedback.
Ok, nevermind.