Skip to main content

← All terms · Testing

pytest

De facto Python test framework. `def test_x():` and `assert` — that's the whole API.

Learn this interactively:

Open lesson lesson-140

Related — Testing

FixtureReusable test setup. Declared with `@pytest.fixture`, injected by parameter nameParametrizeRun the same test against multiple inputs: `@pytest.mark.parametrize("x,y", [(1,CoverageMeasures which lines your tests execute. 100% is rarely the goal — 'every import