Testing.update test outcomes

From gpsaggese/helpers · View interactive version

Testing.update test outcomes is an AI agent skill from the GitHub repository gpsaggese/helpers. Update the expected outcome of failing unit tests

How to use this skill

Skill file

Goal

<FAILING_TESTS> whose actual and expected outputs mismatch

Important

.claude/skills/testing.rules.md

Workflow

Run the Failing Tests

due to mismatching outputs

Classify the Assertion Method

hunteuti.assert_sys_calls(), self.assertEqual())

path of test | fail / pass | check_string or assert_equal

```text

| 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 |

```

Update the Expected Output

(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 the expected variable

```python

expected = """

[{'args': (f'jupytext --to ipynb --update {py_file}',),

'function': 'hsystem.system',

'kwargs': {}},

{'args': (f'jupytext --sync {py_file}',),

'function': 'hsystem.system',

'kwargs': {}}]

"""

```

Verification

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.