Write pytest tests for Python modules, functions, classes, or methods following Sanhe's best practices
How this command is triggered — by the user, by Claude, or both
Slash command
/sanhe-py-best-practices:test-for user's test writing requestThe summary Claude sees in its command listing — used to decide when to auto-load this command
Use the `python-test-strategy` agent skill to handle the following test writing request: $ARGUMENTS
Use the python-test-strategy agent skill to handle the following test writing request:
$ARGUMENTS
npx claudepluginhub MacHu-GWU/sanhe-claude-code-plugins --plugin sanhe-py-best-practices/python-testingWrites or improves pytest tests for scientific Python code using fixtures, parametrization, and numerical testing patterns. Verifies changes by running pytest.
/testGenerates tests for completed code phases by auto-detecting the test framework and targeting key files.
/generate-test-casesGenerates unit, integration, edge case, performance, and error-handling test cases for target code or functions, including mocks, stubs, data-driven tests, and coverage analysis.
/analyze-testsAnalyzes Python test suites in current or specified directories for quality, coverage, structure, patterns, and performance, reporting metrics, scores, and improvement recommendations.
/ai-testCreates quality tests for described functionality using a Ralph-loop pattern with coder and reviewer agents. Accepts a local repo path, Kaiten card ID, or free-text description.