Systematic test suite generation that transforms source code into comprehensive, runnable pytest files. Analyzes function signatures, dependency graphs, and complexity hotspots to produce tests covering happy paths, boundary conditions, error states, and async flows — with properly scoped fixtures and focused mocks.
| references/pytest-patterns.md | Fixture scopes, parametrize, marks, conftest layout, built-in fixtures | Always | | references/mock-strategies.md | Mock decision tree, patch boundaries, assertions, anti-patterns | Target has external dependencies |
| references/async-testing.md | pytest-asyncio modes, event loop fixtures, async mocking | Target contains async code | | references/fixture-design.md | Factory fixtures, yield teardown, scope selection, composition | Test requires non-trivial setup |
Generates comprehensive pytest test suites: happy path, edge cases, error conditions, fixture scaffolding, mock strategy, and async patterns. Analyzes function signatures, dependency chains, and complexity hotspots to produce runnable, parametrized test files. Triggers on: "generate tests", "write tests for", "test this function", "test this class", "create test suite", "what tests should I write", "pytest for", "unit tests for", "mock strategy for", "how to test", "test coverage for", "write a test file". Use this skill when given a Python function, class, or module and asked to produce tests. Source: mathews-tom/praxis-skills.