Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by fabioz

3 years ago

My go-to library in python for this is:

https://pypi.org/project/pytest-regressions/

It's a bit different in that it'll save the expected to a different file... IMHO that's usually nicer because the test result is usually big and having it separated makes more sense.

When rerunning it's possible to run pytest with '--force-regen' and then check the git diff to see if all the changes were expected.

0 comments

fabioz

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities