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 |
Genera suite di test pytest complete: percorso felice, casi limite, condizioni di errore, impalcatura dei dispositivi, strategia simulata e modelli asincroni. Analizza le firme delle funzioni, le catene di dipendenza e gli hotspot di complessità per produrre file di test parametrizzati e eseguibili. Si attiva su: "genera test", "scrivi test per", "prova questa funzione", "prova questa classe", "crea suite di test", "quali test dovrei scrivere", "pytest per", "test unitari per", "strategia simulata per", "come testare", "testare la copertura per", "scrivere un file di test". Usa questa abilità quando ti viene data una funzione, una classe o un modulo Python e ti viene chiesto di produrre dei test. Fonte: mathews-tom/praxis-skills.