snapshottest
snapshottest copied to clipboard
Snapshot Testing utils for Python 📸
Rationale ========= When importing from `snapshottest` package this might result in confusion as the `TestCase` class name is used by multiple subpackages. ```py from snapshottest import TestCase # This results...
### Motivation The motivation behind this feature is to enable a more simple and practical workflow. Mocking any random values is of course viable, but usually more work. Also this...
When utilizing dataclasses you can define them to be identified by it's attributes. It'd be nice if rather than doing the "GeneralRepr" solution, you would simply use the `dir(obj)` when...
It appears that the snapshots produced by this library are delimited by three single quotes. If, however, the snapshot data ends in a single quote, the file `snapshots/test_SOMETHING.py` ends up...
I would like to test a code that produces PNG file as `bytes`. Snapshot should be saved as PNG file directly. GitHub PRs would become super useful, because I can...
if you set ``` __unittest = True ``` in your various files, then the stackstrace in unittest (and others) will skip references in that file. This means that i would...
Currently snapshottest won't raise Exception while there is no snapshot exists. It is not expect behavior during test. It would be useful if there is an options or flags to...
When running nosetests with a test class name, snapshots are not updated when `--snapshot-update` is provided on the command line: ``` # this works $ nosetests --snapshot-update path/to/test_file.py # this...
Right now snapshots are stored in a preconfigured `snapshots/` directory — it would be nice if this was customizable, especially if an existing directory with the same name exists.
After upgrading from 0.5.0 -> 0.5.1, it looks like the value in the snapshot is being returning as non-serializable generator? ``` def assert_equals(self, value, snapshot): > assert value == snapshot...