snapshottest
snapshottest copied to clipboard
Snapshot Testing utils for Python 📸
generated snapshot: snapshots['test_foo 1'] = 'test' snapshots['test_foo 10'] = 'test' snapshots['test_foo 11'] = 'test' . . . snapshots['test_foo 2'] = 'test' . . . Is there a way to get...
**Feature request:** provide a custom comparison function for files. ### Current method At the moment the method `filecmp.cmp()` is used to compare two files https://github.com/syrusakbary/snapshottest/blob/master/snapshottest/file.py#L52 ```python def assert_value_matches_snapshot(self, test, test_value,...
If there is an error while generating the declarations, the output file will be truncated. This will cause existing snapshots to disappear, as well as make further runs fail because...
Add test-session-level features for raw unittest framework: * Support --snapshot-update command line option * Issue "SnapshotTest summary" at end of test run * Remove unused snapshots when in update mode...
Currently, AFAIK snapshottest.django.TestCase does not reset DB sequences between tests which django.test.TestCase does. It leads to the situation when snapshots differ depends on the order of test execution, i. e....
Currently, the generated snapshot file includes "v1" in a header comment, indicating v1 of the snapshot file format. (I believe this approach was borrowed from jest-snapshot.) **Current snapshot file:** (ignoring...
It seems like there are a lot of areas where snapshottest's own test coverage could (and should) be improved. Examples: * Although we [test the examples] against their old snapshots,...
Hi, thank you for creating this library! I am using snapshottest on a project that has a level of randomization to test interdependent relationships. It would be helpful if snapshottest...
Self-explanatory. Some potential ideas / handlers: https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertAlmostEqual https://docs.scipy.org/doc/numpy/reference/generated/numpy.testing.assert_almost_equal.html https://docs.python.org/3/whatsnew/3.5.html#pep-485-a-function-for-testing-approximate-equality