Back to catalog / Developer tools
Python pytest: verify behavior and boundaries with isolated tests
Organize unit/integration tests, fixtures, mocks, parametrization, and async coverage.
Skills
Confirm public behavior, test command, and which dependencies must be isolated. Use pytest fixtures for minimal data and Arrange/Act/Assert structure. Parameterize boundary inputs; mock unstable network/time/random dependencies. Use the project’s supported pytest asyncio plugin for async code. Integration tests need disposable databases and separate credentials; never touch production or paid APIs. Cover errors, retries, concurrency, and cleanup. Prefer stable, reproducible failure cases over optimizing coverage percentage alone.
Permissions
Prerequisites
- For building/extending pytest suites, fixtures, parametrization, async tests, or property tests.
- Specify code under test, test command, and external dependency boundaries.
Permissions
- May add tests/dependencies and run local suites.
- Mock services or isolate integration environments; tests must not cause real trades or charges.
Limitations
Test behavior, not internals; keep tests isolated/repeatable and cover errors/boundaries rather than chasing coverage alone.
Pinned upstream source
- Repository
- wshobson/agents
- File path
- plugins/python-development/skills/python-testing-patterns/SKILL.md
- Pinned commit
46891e7e60da0e52baf1050b7b6391b64e84c6d9- Source checked
- 2026-10-14 · Reviewed against the pinned upstream source
Repository metrics
These values describe the upstream repository, not popularity or likes for an individual skill or playbook.
- Stars
- Not collected
- Forks
- Not collected
- Observed at
- Not collected
No metrics snapshot is available yet.
License: MIT
Compatible tools
pytest runner · Fixtures and parametrization · Mocked external services
Main topic
Take a coding Agent change from context to verification