From python3-development
Guides systematic test failure investigation with dual hypotheses (test vs. code issue), step-by-step protocol, red flags, and best practices.
npx claudepluginhub jamie-bitflight/claude_skills --plugin python3-developmentThis skill uses the workspace's default tool permissions.
Establish a balanced investigative approach for all test failures encountered in this session.
Guides systematic test failure investigation with dual hypothesis (test wrong vs. code bug), step-by-step protocol, red flags for pitfalls, and learning practices.
Guides systematic investigation of test failures using dual-hypothesis approach (test wrong vs. implementation bug) and step-by-step protocol. Use for diagnosing test errors or establishing test failure mindset.
Analyzes failing tests to classify as test bugs, implementation bugs, or ambiguous. Investigates test intent vs code behavior with evidence, recommends targeted fixes.
Share bugs, ideas, or general feedback.
Establish a balanced investigative approach for all test failures encountered in this session.
Consult ../python3-development/references/python3-standards.md when shared testing or quality rules from this plugin apply; full standards, graphs, and amendment process are documented there.
Tests are specifications - they define expected behavior. When they fail, it's a critical moment requiring balanced investigation, not automatic dismissal.
Always consider both possibilities when a test fails:
| Hypothesis A | Hypothesis B |
|---|---|
| Test expectations are incorrect | Implementation has a bug |
| Test is outdated | Test caught a regression |
| Test has wrong assumptions | Test found an edge case |
For EVERY test failure:
| Situation | Action |
|---|---|
| Implementation is wrong | Fix the bug |
| Test is wrong | Fix test AND document why |
| Unclear | Seek clarification before changing |
Good: "I see test_user_validation is failing. Let me trace through the validation logic to understand if this is catching a real bug or if the test's expectations are incorrect."
Bad: "The test is failing so I'll update it to match what the code does."
Every test failure is an opportunity to:
The goal is NOT to make tests pass quickly. The goal IS to ensure the system behaves correctly.