MCPcopy Create free account
hub / github.com/pytest-dev/pytest / pytest_generate_tests

Function pytest_generate_tests

testing/example_scripts/issue_519.py:8–13  ·  view source on GitHub ↗
(metafunc)

Source from the content-addressed store, hash-verified

6
7
8def pytest_generate_tests(metafunc):
9 if "arg1" in metafunc.fixturenames:
10 metafunc.parametrize("arg1", ["arg1v1", "arg1v2"], scope="module")
11
12 if "arg2" in metafunc.fixturenames:
13 metafunc.parametrize("arg2", ["arg2v1", "arg2v2"], scope="function")
14
15
16@pytest.fixture(scope="session")

Callers

nothing calls this directly

Calls 1

parametrizeMethod · 0.80

Tested by

no test coverage detected