pytest
The standard Python testing framework — simple, powerful, with a rich plugin ecosystem for unit, integration, and end-to-end tests
Visit pytest →pytest is the de facto standard test runner for Python — plain assert statements instead of unittest’s method-based assertions, fixtures for reusable setup, and a large plugin ecosystem covering coverage, parallelism, and mocking. It can also discover and run unittest-style tests unchanged, which is why teams migrate to it gradually rather than rewriting an existing suite.
See pytest vs unittest for why it’s become the default choice over the standard library’s built-in testing module, and Best Python Testing Tools, Compared for the fuller ecosystem around it.