Skip to content

Glossary: Software Design Patterns

Fixture

Also written: pytest fixture, @pytest.fixture, fixtures

A function marked `@pytest.fixture` that builds test data or parts. pytest calls it afresh for each test and passes the result to any test whose parameter has the same name.

Where the book teaches it

Related terms

pytestDependency injectionInversion of control