gpsaggese/helpers / .claude/skills/testing.fix_unit_tests
testing.fix_unit_tests
VerifiedApply the conventions usually not followed in the unit test
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 1.3 KB |
SKILL.md
View on GitHub---
description: Apply the conventions usually not followed in the unit test
model: haiku
---
# Goal
- The user passes one or more test files `<FILE>`. Apply the corresponding
conventions and rules to them.
# Workflow
## Read Rules
- Read the transformations from `.claude/skills/testing.rules.md` in the
following headers
- `### Dedent Strings to the Code`
- `## Test Method Names`
- `## Use Helper Methods When You Have Repetitive Tests`
- `### Avoid Replicated Assignment`
- `## Consolidate Inputs and Outputs`
- `## Assign Variables and Then Call Functions`
- `## Compare Whole Output with assert_equal, Not Piecewise`
- ``## Do Not Use `hdbg.dassert` to Test Assertions``
## Draft a Plan
- List the transformations and the code lines to apply them to, since the code
violates them
## Implement the Plan
- Apply the transformations one at a time to the parts of the code
## Refactor the Code
- Run the skill `/coding.factor_common_code` on the file `<FILE>` to factor out
common code
# Important
- Make sure that there is no change in behavior in the code
- For all the code you must follow the instructions in:
- `.claude/skills/coding.rules.md`
- `.claude/skills/testing.rules.md`
# Verification
- [ ] Check that no remaining part of the code violates the list of
transformations
- [ ] Run the tests and confirm behavior is unchanged
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |