Pytest

Expert guidance for writing, organizing, debugging, and running Python tests with pytest. Covers fixtures, parametrize, marks, mocking (monkeypatch + pytest-mock), async tests, output capture, conftest.py patterns, and plugins (pytest-cov, pytest-asyncio, pytest-xdist). Use this skill whenever the user is writing Python tests, setting up test infrastructure, debugging failing tests, adding pytest configuration in pyproject.toml, working with conftest.py, or using any pytest plugin. Invoke it even when the user just says "write me a test" or "my test is failing" or "add coverage" — if it involves Python testing, this skill applies.

kpatryk 8f5628b 11.6 KB Updated

File contents

kpatryk/skills/tree/main/skills/pytest commit 8f5628ba97

Frequently asked questions

npx skillmds@latest add kpatryk/pytest