Pytest Type Safety

Enforce type safety in all tests: type annotations for test functions and fixtures, mock autospec patterns, mypy configuration for tests, type-safe assertions, generic type handling in mocks. Includes protocol-based typing and cast patterns for complex scenarios. Use when: Writing type-safe tests, configuring mypy for test files, using protocols for mocks, enforcing type checking in CI/CD, or debugging type-related test issues.

dawiddutoit Updated

File contents

dawiddutoit/custom-claude/tree/main/skills/pytest-type-safety commit 9520a42834

Frequently asked questions

npx skillmds@latest add dawiddutoit/pytest-type-safety