snapshottest
snapshottest copied to clipboard
Snapshot Testing utils for Python 📸
# versions - Snapshottest : 0.6.0 - Python: 3.9.1 - djangorestframework: 3.12.0 - Django: 3.1.1 # Explaination It might be due to me running django rest framework, but the JSON...
Here's an example of how the snapshot is currently formatted: ``` snapshots['test_foo 1'] = '''ID Name Description ------------------------------------ ------------ ------------------------------- 32fd8c27-9110-463f-89c0-eb676814923a Item 1 An item with a long description 32fd8c27-9110-463f-89c0-eb676814923a...
This PR introduced simple callbacks which can be used to modify content of the snapshot file before write it. The main purpose is to allow formatting files (see example with...
Hi! Thanks for this useful tool! When I save out new snapshots, they aren't in the format recognized by Black, which involves running the formatter a second time. This is...
Please consider adding ignored fields that not necessarily need to match. It would be useful to ignore auto-generated fields like database ids and last_modified timestamps
When tests are run in parallel, snapshottest writes the resulting snapshot to a file based on the name of the python source file. For example, `test_something.py` results in `snap_test_something.py`. This...
Fixes #73 Possibly should only be included in a new major version so that it doesn't break people's CI.
Hi, analogous to #73, it would be nice to be able to set CI to fail if any snapshot that exists was not used. I understand that it will cause...
Is there a way to fail when running tests and there will be a new snapshot written?
# Description This is a complementary method to allow asserting snapshots while ignoring certain fields. - Based on https://github.com/syrusakbary/snapshottest/pull/102 and solving #21 #68 #32 - Our team at https://github.com/reversso has...