Closed
Description
This test passes:
import pytest
@pytest.fixture
def fixture(argument):
return argument
@pytest.mark.parametrize("argument", ["foo", "bar"])
def test_with_argument(argument, fixture):
assert argument == fixture
@pytest.mark.parametrize("argument", ["baz"])
def test_without_argument(fixture):
assert "baz" == fixture
I failed to find any documentation on this argument passing technique.
Is it a supported and known feature or just a by-product of pytest.mark.parametrize
implementation details?
My setup:
$ pip list | grep pytest
pytest 3.8.0
pytest-socket 0.3.1