snapshottest
snapshottest copied to clipboard
Snapshot Testing utils for Python 📸
e.g. test case ``` def test_f(snapshot): x = {} snapshot.assert_match(x) # should be {} x["a"] = 1 snapshot.assert_match(x) ``` snapshot ``` snapshots['test_f 1'] = { 'a': 1 #
Appending `--update-snapshot` as is done with nosetest, etc throws `ImportError: No module named --update-snapshot`. The docs are unclear how exactly to pass this param when using unittest. Is this features...
As I mentioned in #118 it would be good to get this library out of 0.x territory. We also have a few breaking changes to make. The next release will...
When I create snapshot for the first time I have no idea what was saved in snapshot. If it's right or wrong. SnapshotTest assumes that first snapshot is always right....
Whenever I am performing snapshot test on functions which returns DTOs, The import statement is keep on changing or modifying, For first run I will get - from snapshottest import...
Seething this crash, full report in here: https://github.com/pytest-dev/pytest/issues/3672 Once snapshottest is uninstalled (even of not in use, as in the example provided) this does not happen. Very easy to recreate....
All tests which snapshots contain freezegun's `FakeDateTime` are failing with this error: ``` _______________________________________________ test_parse _______________________________________________ args = () kwargs = {REDACTED 'snapshot': } def wrapper(*args, **kwargs): > with self...
When using https://github.com/ropez/pytest-describe together with snapshottest like so: ```python def describe_a(): def test_a(snapshot): snapshot.assert_match('wohoo') def describe_b(): def test_a(snapshot): snapshot.assert_match('ohnoes') ``` only one snapshot (`test_a 1`) is created with the content...
I would expect that: ```sh pytest -vsx tests/test_something.py::test_thething --snapshot-update ``` would only update the snapshots associated with `test_thething`. But it appears that instead it updates all of the snapshots associated...
`Snapshottest` should implement a class or functionality similar to `unittest.TestLoader` so that suit tests can be loaded either sequentially (as declared in our test class) or alphabetically. For example: `loader...