Skip to content
Commitpedia
Log in Join & edit

pytest

pytest is the de facto standard test runner for Python: plain functions with assert, detailed failure reports, fixtures, parametrization and a large plugin ecosystem.

Not checked by a trusted editor yet Last edited Outdated?

Edit history of pytest: 1 recorded edit
Edit history · 1 edit
Type
Repo
Edits
1
Editors
1
First issued
15 Oct 2026
Last edit
15 Oct 2026
Source
pytest-dev/pytest

pytest-dev/pytest

Stars
14.6k
Forks
3.5k
Language
Python
Licence
MIT
Last push
13 Oct 2026

On GitHub: The pytest framework makes it easy to write small tests, yet scales to support complex functional testing

Open on GitHub

pytest discovers test files and functions by naming convention, runs them, and rewrites ordinary assert statements so a failure shows the actual values involved. Its fixture system handles setup and teardown through function parameters, and built-ins such as tmp_path, monkeypatch and capsys cover common needs without extra code. It can also run existing unittest test cases, which makes migrating an older project gradual.

Use it for any Python project that has tests, from a single script to a large application. Plugins extend it for coverage reports (pytest-cov), running tests in parallel (pytest-xdist), async code and web frameworks. Configuration lives in pyproject.toml under [tool.pytest.ini_options].

The repository holds the source, the changelog and the issue tracker; the full documentation is at docs.pytest.org. For a hands-on start, see the article “Testing with pytest: first tests, fixtures and parametrize”.

See also

History

Every saved edit is kept. The plot on the sleeve draws one line per edit. Open any edit to see exactly what changed.

  1. Commitpedia +934 chars

Report a problem

Something wrong, unsafe or copied? Tell the editors.
What is wrong?