Skip to main content

← All terms Β· Testing

Parametrize

Run the same test against multiple inputs: `@pytest.mark.parametrize("x,y", [(1,2), (3,4)])`. Replaces copy-paste tests.

Learn this interactively:

Open lesson lesson-142 β†’

Related β€” Testing

pytestDe facto Python test framework. `def test_x():` and `assert` β€” that's the whole …FixtureReusable test setup. Declared with `@pytest.fixture`, injected by parameter name…CoverageMeasures which lines your tests execute. 100% is rarely the goal β€” 'every import…