Pytest Accept
Description
A pytest plugin for automatically updating doctest outputs
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
pytest-accept
[](https://github.com/max-sixty/pytest-accept/actions?query=workflow:test) [](https://pypi.python.org/pypi/pytest-accept/) [](https://github.com/max-sixty/pytest-accept/blob/main/LICENSE)
pytest-accept is a pytest plugin for automatically updating outputs. It runs along with pytest, observes the generated outputs, and writes them to the test's documented outputs.
Before
def extract_functions(code):
return re.findall(r"(\w+)\(", code)
def test_extract_functions():
assert extract_functions("print('hi')") == ["print"]
assert extract_functions("sum(map(f, x))") == ["sum"]
After `pytest --accept`
def test_extract_functions():
assert extract_functions("print('hi')") == ["print"]
- assert extract_functions("sum(map(f, x))") == ["sum"]
+ assert extract_functions("sum(map(f, x))") == ["sum", "map"]
pytest-accept is decoupled from the tests it works with — it can be used with existing tests, and the tests it edits are no different from normal tests. It works with both doctests and normal `assert` statements.
Installation
uv tool install -U pytest-accept
Or with pip:
pip install pytest-accept
To run, just pass `--accept` to pytest:
pytest --accept
Why?
- Often it's fairly easy to observe whether something is working by viewing the output it produces
- ...but often the output is verbose, and copying and pasting the output into the test is tedious
pytest-acceptdoes the copying & pasting for you- Similarly, lots of folks generally find writing any tests a bit annoying, and prefer to develop by "running the code and
Related Skills
Spec Kit
💫 Toolkit to help you get started with Spec-Driven Development
Testing Webapp Testing
Test local web applications using Playwright for UI verification and debugging
Testing #29
, [#52](https://github.com/affaan-m/everything-claude-code/issues/52), [#103](https://github.com/affaan-m/ever
Testing Fix Issue
by metabase - Addresses GitHub issues by taking issue number as parameter, analyzing context, implementing sol
Testing Pypict Test Design
Design comprehensive test cases using PICT (Pairwise Independent Combinatorial Testing) for optimized test sui
Testing gstack
| 15,000+ | Garry Tan's exact Claude Code setup: 6 opinionated tools that serve as CEO, Eng Manager, Release M
Testing