-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
status: help wanteddevelopers would like help from experts on this topicdevelopers would like help from experts on this topictopic: parametrizerelated to @pytest.mark.parametrizerelated to @pytest.mark.parametrize
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" == fixtureI 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.1Metadata
Metadata
Assignees
Labels
status: help wanteddevelopers would like help from experts on this topicdevelopers would like help from experts on this topictopic: parametrizerelated to @pytest.mark.parametrizerelated to @pytest.mark.parametrize