| Fixture not async | Use async def for fixtures using runtest() | | Missing yield | Use yield not return in async context fixtures | | Fixture scope wrong | Default to function scope for Textual apps | | Mock not cleaned up | Use context managers (with patch(...)) |
Pytest fixture patterns for Textual TUI application testing. Creates reusable test setup code including app factories, Pilot wrappers, mock fixtures, and async patterns. Use when: setting up test infrastructure for Textual apps, creating reusable test fixtures, mocking external dependencies (APIs, databases, time), organizing conftest.py, or reducing test boilerplate. Covers async fixtures, factory patterns, and mock strategies. Source: dawiddutoit/custom-claude.
Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/dawiddutoit/custom-claude --skill textual-test-fixtures Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw