Used in agent projects
330
2.6% of 12,697 public repos built with AI coding agents
Rank in testing
#6 of 40
by use in those projects
Downloads
196M
PyPI, last 7 days, pytest
GitHub stars
14.6K
last push Oct 10, 2026
How pytest is used
pytest is a dependency in 330 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (2.6%), #6 of 40 in testing. The most used alternative there is Vitest. Projects that use it most often also use python-dotenv (62.1%), Pydantic (52.7%), Requests (47.9%). It is more common in projects set up for Roo Code (8.8%) than for OpenAI Codex (3.1%).
Often used with pytest
| python-dotenv | 62.1% of pytest projects · 9.5× more than average |
|---|---|
| Pydantic | 52.7% of pytest projects · 10.3× more than average |
| Requests | 47.9% of pytest projects · 9.0× more than average |
| Uvicorn | 47.9% of pytest projects · 11.2× more than average |
| FastAPI | 44.8% of pytest projects · 10.6× more than average |
| NumPy | 44.5% of pytest projects · 11.6× more than average |
| pandas | 36.1% of pytest projects · 12.0× more than average |
| PyYAML | 35.8% of pytest projects · 11.8× more than average |
By coding agent
| GitHub Copilot | 4.4% of projects set up for it |
|---|---|
| Claude Code | 4.0% of projects set up for it |
| Cursor | 3.8% of projects set up for it |
| Devin Desktop | 5.5% of projects set up for it |
| Gemini CLI | 3.2% of projects set up for it |
| OpenAI Codex | 3.1% of projects set up for it |
| OpenCode | 3.4% of projects set up for it |
| Roo Code | 8.8% of projects set up for it |
Share of public repos configured for each agent that list pytest as a dependency.
Install
| Package | pip install pytest |
|---|---|
| Packages counted | pytest, pytest-asyncio, pytest-cov, pytest-mock, pytest-xdist, pytest-playwright, pytest-timeout, pytest-xprocess |
| Main stacks | Python (323), Next.js (5), Other (2) |
| Example projects | solana-developers/solana-cookbook, sidetrip-ai/ici-core, assafkip/kipi, timowhite88/Farnsworth, kr8tiv-ai/Jarvis |
Alternatives to pytest
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| Vitest npm Next-generation testing framework powered by Vite with native ESM. |
1,549 (12.2%) | 123M | 17.2K | MIT |
| Playwright (JavaScript) npm Cross-browser automation library for end-to-end testing. |
1,117 (8.8%) | 74.2M | 97.4K | Apache-2.0 |
| Testing Library npm Testing utilities for React encouraging testing user behavior. |
915 (7.2%) | 68.7M | 19.7K | MIT |
| Jest npm Delightful JavaScript testing framework with minimal configuration. |
702 (5.5%) | 46.3M | 45.6K | MIT |
| jsdom npm JavaScript implementation of web standards for testing DOM interactions. |
681 (5.4%) | 112M | 21.7K | MIT |
| Chai npm BDD/TDD assertion library for Node.js and browsers with expressive syntax. |
305 (2.4%) | 14M | 8,265 | MIT |
| Mocha npm Feature-rich JavaScript test framework for Node.js and browsers. |
281 (2.2%) | 12.6M | 22.9K | MIT |
| ts-mocha npm Mocha wrapper for running TypeScript tests directly with ts-node without compilation. |
191 (1.5%) | 573K | 196 | MIT |