Pytest Testing

Comprehensive guide for writing Python tests with pytest and the modern testing ecosystem. Use this skill whenever the user asks to write, fix, refactor, or review Python tests — including unit tests, integration tests, async tests, API tests, or any test file using pytest. Also trigger when the user asks to add test coverage to existing code, set up a testing infrastructure for a Python project, write conftest.py files, create test fixtures, mock dependencies, or test async code. Trigger for questions about pytest configuration, test structure, marker strategies, or when the user says 'write tests for this', 'add tests', 'test this function', 'how should I test X', or mentions pytest, pytest-mock, pytest-cov, testcontainers, anyio testing, respx, hypothesis, dirty-equals, inline-snapshot, polyfactory, or time-machine in a testing context. Do NOT trigger for JavaScript/TypeScript testing (vitest, jest) or non-Python test frameworks. Use when this capability is needed.

tomevault-io Updated

File contents

tomevault-io/skills-registry/tree/main/leodiegues--skills--pytest-testing commit e08076d0f6

Frequently asked questions

npx skillmds@latest add tomevault-io/pytest-testing