AGENT SKILL
testing.fix_unit_tests
Apply the conventions usually not followed in the unit test
使用场景测试与质量
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-02
- Stars
- ★ 155
- Forks
- 170
01 前言 Front Matter
- model
- haiku
- description
- Apply the conventions usually not followed in the unit test
03 SKILL.md 正文
Goal
- The user passes one or more test files
<FILE>and you need to apply the corresponding conventions and rules.
Workflow
Read Rules
- Read the transformations from
.claude/skills/testing.rules.mdin 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
- Given the code passed in
<FILE>and the list of all the transformations create a list of transformations and code lines to apply them, since the code violates them
Implement the Plan
- Apply the transformations one at the time to the parts of the code
Refactor the Code
- Run the skill
/coding.factor_common_codeon 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
04 同仓库更多 Skills
tutorial_in_60_mins.propagate_docker_changes
Sync tutorial and class-project Docker files to match project_template
★ 155
tutorial_in_60_mins.merge_markdown
Merge the content of a markdown file into a Jupyter notebook
★ 155
tutorial_in_60_mins.format
Format a directory to follow the "Learn X in 60 Minutes" tutorial conventions
★ 155
tutorial_in_60_mins.create
Create a tutorial directory for the Learn X in 60 Minutes conventions
★ 155
todo.reorg_in_progress
Reorganize ai_task_queue.md so in-progress tasks, not-started tasks, and mislabeled topic headers sit under the right H1 stage
★ 155
todo.reorg_headers
Reorganize ai_task_queue.md .md so every H2 topic matches ALL TOPICS and every H3 task sits under the right topic, keeping its H1 stage
★ 155