pytest
pytest is a free Python framework for writing small, readable tests and expanding them into functional testing for applications and libraries.
What pytest is
pytest is a free Python framework for writing small, readable tests and expanding them into functional testing for applications and libraries. It automatically finds test modules and functions according to standard naming conventions. When an assert fails, assertion introspection provides detailed information about the failure. Fixtures supply resources such as unique temporary directories and can be shared or parametrized. Test runs can be narrowed by module, directory, keyword, collection path or marker expression. pytest can run unittest suites, including trial, and its plugin architecture supports external extensions; the project home reports more than 1300. It can also be invoked from Python code. The listed runtimes are Python 3.10+ or PyPy 3, and pytest 9.0+ requires Python 3.10+. The documented installation command is `pip install -U pytest`. For bugs and feature requests, the project directs users to GitHub issues; suspected security vulnerabilities should instead be reported through a new GitHub security advisory.
Good
- Automatically discovers tests by naming convention.
- Detailed information for failing assert statements.
- Fixtures can be shared or parametrized.
- Runs unittest suites, including trial.
- Supports external plugins.
Watch out
- pytest 9.0+ requires Python 3.10+.
- No snapshot testing.
- No property-based checks.
Who it suits
pytest suits Python developers testing applications or libraries, from small readable tests to more complex functional testing. Organizations seeking commercial support for open-source dependencies can also consider the listed Tidelift support offer.
Verdict
pytest combines automatic discovery, fixtures and detailed assertion feedback with a plugin architecture. Check the Python runtime requirement for the version you plan to use.
Plans and prices
From pytest's own pricing page, checked 29 Sep 2026.
| Plan | Price | What it gives you |
|---|---|---|
| pytest | Free | Open source Python testing framework |
The facts
Each one read from pytest's own pages, with the date it was checked.
What it does
- Assertions
- pytest provides detailed information about failing assert statements through assertion introspection.checked 29 Sep 2026
- Compatibility
- pytest can run unittest test suites, including trial, out of the box.checked 29 Sep 2026
- Enterprise services
- The Tidelift subscription description lists security updates, licensing verification and indemnification, maintenance, version guidance, roadmap input, and tooling and cloud integration.checked 29 Sep 2026
- Fixtures
- Fixtures provide resources to tests, including unique temporary directories, and can be shared or parametrized.checked 29 Sep 2026
- Install
- The getting-started guide installs pytest with the command pip install -U pytest.checked 29 Sep 2026
- Integrations
- The documentation describes loading external plugins, including pytest-cov, and pytest can be invoked from Python code.checked 29 Sep 2026
- Intended users
- pytest is described for testing applications and libraries, and its enterprise support offer is aimed at organizations using open source dependencies to build applications.checked 29 Sep 2026
- Plugins
- pytest has a plugin architecture and the project home reports more than 1300 external plugins.checked 29 Sep 2026
- Purpose
- pytest is a framework for writing small, readable tests that can scale to complex functional testing for applications and libraries.checked 29 Sep 2026
- Security
- The project asks users to report suspected security vulnerabilities through a new GitHub security advisory instead of creating an issue.checked 29 Sep 2026
- Support
- The project directs users to GitHub issues for bugs and feature requests and offers commercial support and maintenance through Tidelift Subscription.checked 29 Sep 2026
- Supported runtimes
- The project home lists Python 3.10+ or PyPy 3; the version support page says pytest 9.0+ requires Python 3.10+.checked 29 Sep 2026
- Test discovery
- pytest automatically discovers test modules and functions using standard naming conventions.checked 29 Sep 2026
- Test selection
- The command line can select tests by module, directory, keyword, collection path, or marker expression.checked 29 Sep 2026
The company
- Founded
- 2004checked 23 Sep 2026





