Testing.Update Test Outcomes
БесплатноБез исполняемых скриптовНе проверенUpdate the expected outcome of failing unit tests
от gpsaggese★ 158 звёзд на GitHubОб этом скилле
Goal
- The user passes a list of tests, or a repro script, with failing tests
<FAILING_TESTS>whose actual and expected outputs mismatch
Plan Only (--only_plan)
- With
--only_plan, follow.claude/skills/skill.rules.mdsection "Create Only a Plan with--only_plan" - Write the plan to
testing.update_test_outcomes.<INPUT_REF>.md, then stop without executing the skill- Run the skill through "Classify the Assertion Method", and stop before "Update the Expected Output"
Important
- For all code, follow
.claude/skills/coding.rules.md - Follow the invariants and conventions for unit tests in
.claude/skills/testing.rules.md
Workflow
Run the Failing Tests
- Run the tests one at a time, the way the user suggested, to confirm they fail due to mismatching outputs
Classify the Assertion Method
For each failing test method, check whether the result is checked with
self.check_string()self.assert_equal()or a similar assertion (e.g.,hunteuti.assert_sys_calls(),self.assertEqual())
Print a table with the following info: path of test | fail / pass | check_string or assert_equal
| Path | Test | Status | Assertion Method | |------|------|--------|------------------| | dev_scripts_helpers/documentation/test/test_notes_to_pdf.py | Test_notes_to_pdf_latex_options::test1 | FAIL | self.assert_equal() with fuzzy_match=True | | dev_scripts_helpers/documentation/test/test_notes_to_pdf.py | Test_notes_to_pdf_latex_options::test2 | FAIL | self.assert_equal() with fuzzy_match=True | | dev_scripts_helpers/documentation/test/test_notes_to_pdf.py | Test_notes_to_pdf_output_types::test1 | FAIL | self.assert_equal() with fuzzy_match=True |Save this to
testing.update_test_outcomes.<INPUT_REF>.mdin the current dir<INPUT_REF>comes from<FAILING_TESTS>, as in.claude/skills/skill.rules.md### Name the Output File
Update the Expected Output
For each failing test method:
- If the result is checked with
self.check_string()- Run the test with the pytest option
--update_goldento refresh the output
- Run the test with the pytest option
- If the result is checked with
self.assert_equal()or a similar assertion (e.g.,hunteuti.assert_sys_calls()), read the file<TEST_DIR>/tmp.initial.actual.txt(e.g.,dev_scripts_helpers/documentation/test/outcomes/Test_run_pandoc_to_html.test1) that holds the actual variable, and update theexpectedvariable- E.g.,
expected = """ [{'args': (f'jupytext --to ipynb --update {py_file}',), 'function': 'hsystem.system', 'kwargs': {}}, {'args': (f'jupytext --sync {py_file}',), 'function': 'hsystem.system', 'kwargs': {}}] """
- E.g.,
- If the result is checked with
Follow
.claude/skills/testing.rules.md:## Code Formatting in Tests# Test Input and Output Handling
Do not change how results are checked
- E.g., do not replace
self.assert*()withself.check_string()or vice versa - E.g., do not replace
self.assert*()withself.assertIn()
- E.g., do not replace
Verification
-
--only_plan(check only this item): the plan is intesting.update_test_outcomes.<INPUT_REF>.mdin the current dir, has theGenerated byline, and nothing was executed - The output file is
testing.update_test_outcomes.<INPUT_REF>.mdin the current dir - Run all the tests to make sure they are passing
Установить Testing.Update Test Outcomes в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Testing.Update Test Outcomes?
Update the expected outcome of failing unit tests
Как установить скилл Testing.Update Test Outcomes?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Testing.Update Test Outcomes запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic