pytest

Python's expressive testing framework with powerful fixtures and plugins.

UnitAPI

At a glance

Parallelismmedium
Learning curvelow
CI fithigh
LanguagesPython

Runner: Own runner; parallelism via the pytest-xdist plugin.

Strengths

  • Plain assert statements with rich introspection on failure.
  • Fixtures model setup/teardown and dependency injection elegantly.
  • Vast plugin ecosystem (xdist, cov, requests-based API testing).

Trade-offs

  • Python only.
  • Parallelism and some features live in plugins rather than the core.

When to use

Reach for pytest for any Python codebase — unit tests, and API/integration tests via the requests ecosystem.