3 ms·
If you want to try this in Python, you can use https://github.com/ezyang/expecttest https://github.com/ezyang/expecttest which I wrote to do expect tests in PyT
by ezyang 4y ago
If you want to try this in Python, you can use https://github.com/ezyang/expecttest https://github.com/ezyang/expecttest which I wrote to do expect tests in PyTorch.
- fabioz 4y agoMy go-to library in python for this is: https://pypi.org/project/pytest-regressions/ 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.