plugins/python-dev/skills/testing-python/SKILL.md
Writes tests following TDD Red-Green-Refactor (pytest + Hypothesis). Tests behavior, not implementation. Use when writing unit tests, integration tests, or property tests.
npx skillsauth add qte77/claude-code-utils-plugin testing-pythonInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Target: $ARGUMENTS
Writes focused, behavior-driven tests following project testing strategy.
TDD methodology (language-agnostic): See tdd-core plugin (testing-tdd skill)
Python-specific documentation: references/
references/testing-strategy.md - Python tools (pytest, Hypothesis, inline-snapshot)references/tdd-best-practices.md - Python TDD examples (extends tdd-core)TDD only: pytest for known cases, Hypothesis for edge cases, inline-snapshot for regression. Tests assert observable behavior — inputs produce expected outputs/side-effects. No Gherkin, no feature files, no step definitions.
See references/testing-strategy.md for tool selection guide.
Cycle: RED (failing test) → GREEN (minimal pass) → REFACTOR (clean up)
Structure: Arrange-Act-Assert (AAA)
def test_order_processor_calculates_total():
# ARRANGE
items = [Item(price=10.00, qty=2), Item(price=5.00, qty=1)]
processor = OrderProcessor()
# ACT
total = processor.calculate_total(items)
# ASSERT
assert total == 25.00
| Priority | Area | Example | | ---------- | ------ | --------- | | CRITICAL | Math formulas | Scores always in bounds | | CRITICAL | Loop termination | Never hangs | | HIGH | Input validation | Handles any text | | HIGH | Serialization | Always valid JSON |
High-Value: Business logic, integration points, edge cases, contracts
Avoid: Library behavior, trivial assertions, implementation details, default constants, stale fixture patches (see references/testing-strategy.md → "Patterns to Remove")
See references/testing-strategy.md → "Patterns to Remove" for full list.
Format: test_{module}_{component}_{behavior}
test_user_service_creates_new_user()
test_order_processor_validates_items()
make test # All tests
make test_rerun # Rerun failed tests (fast iteration)
make validate # Full pre-commit validation
pytest tests/ -v # Verbose
pytest -k test_user_ # Filter by name
make test)development
Analyzes industry websites for design patterns, layout, typography, and content strategies using first-principles thinking. Use when researching website design, UI patterns, or competitive design analysis.
development
Audits website usability for UX optimization, covering forms, navigation, validation, and microcopy. Use when reviewing user experience, task completion flows, or interface friction points.
development
Audits website accessibility for WCAG 2.1 AA compliance, generating findings and code fixes. Use when reviewing accessibility, keyboard navigation, screen reader compatibility, or inclusive design.
development
Writes tests following TDD (using vitest and @testing-library/react) best practices. Use when writing unit tests, integration tests, or component tests in TypeScript.