conftest.py
A special pytest file whose fixtures and hooks are available to every test in its directory and below without importing them.
In more detail
Put shared fixtures here instead of in each test file. A project can have several conftest.py files at different directory levels.
Related terms
- fixture — A named piece of setup, defined with @pytest.fixture, that a test receives by listing the fixture's name as a parameter.
- pytest — A popular Python testing framework that finds test functions automatically and reports failures with detailed comparisons.
Taught in
- Fixtures And Their Scope — Automated Testing, TDD & Quality Engineering