Agent skill · software engineering · sickn33
pytest-skill
Generates production-grade pytest tests in Python with fixtures, parametrize, markers, mocking, and conftest patterns. Use when user mentions \"pytest\", \"conftest\", \"@pytest.fixture\", \"@pytest.mark\", \"Python test\".
Why this skill is useful
Generates specific pytest test patterns and fixtures that the AI wouldn't reliably create on its own.
What it needs
About 3k tokens when loaded. Last updated 2026-08-07. 44,571 stars on the source repository.
What this skill does
Pytest Testing Skill When to Use Use this skill when you need generates production-grade pytest tests in Python with fixtures, parametrize, markers, mocking, and conftest patterns. Use when user mentions "pytest", "conftest", "@pytest.fixture", "@pytest.mark", "Python test". Triggers on: "pytest", "conftest", "Python test", "parametrize", "Python... Core Patterns Basic Test Fixtures Parametrize Markers Mocking Assertions Anti-Patterns Bad Good Why ----- ------ ----- self.assertEqual() assert x == y pytest rewrites give better output Setup in init @pytest.fixture Lifecycle management Global state Fixture with yield Proper cleanup Huge test functions Small focused tests Easier debugging Quick Reference Task Command ------ --------- Run all pytest Run file pytest tests/testlogin.py Run specific pytest tests/testlogin.py::testloginsuccess By marker pytest -m slow By keyword pytest -k "login and not invalid" Verbose pytest -v Stop first fail pytest -x Last failed pytest --lf Coverage pytest --cov=myapp --cov-report=html Parallel pytest -n auto (pytest-xdist) pyproject.toml Deep Patterns For production-grade patterns, see reference/playbook.md: Section What's Inside --------- -------------- §1 Config pytest.ini + pyproject.toml with markers, coverage §2 Fixtures Scoping, factories, teardown, autouse, tmppath §3 Parametrize Basic, with IDs, cartesian, indirect §4 Mocking pytest-mock, monkeypatch, spies, env vars §5 Async pytest-asyncio, async fixtures, async client §6 Exceptions pytest.raises(match=), warnings §7 Markers & Plugins Custom markers, collection hooks §8 Class-Based Nested classes, autouse setup §9 CI/CD GitHub Actions matrix, coverage gates §10 Debugging Table 10 common problems with fixes §11 Best Practices 15-item production checklist Limitations Use this skill only when the task clearly matches its upstream source and local project context. Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills sickn33/pytest-skill--8c4c49