Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ forgiving behavior, you can use `soft_fail()` which is collected like any other

### Snapshot Testing

Take a snapshot of a python data structure, store it on disk in JSON format, and automatically compare the latest data to the stored data on every test run. The snapshot testing features of `assertpy` are borrowed from [Jest](https://facebook.github.io/jest/), a well-known and powerful Javascript testing framework. Snapshots require Python 3.
Take a snapshot of a python data structure, store it on disk in JSON format, and automatically compare the latest data to the stored data on every test run. The snapshot testing features of `assertpy` are borrowed from [Jest](https://facebook.github.io/jest/), a well-known and powerful JavaScript testing framework. Snapshots require Python 3.

For example, snapshot the following dict:

Expand Down Expand Up @@ -906,7 +906,7 @@ assert_that(someobj).snapshot()

Snapshot artifacts (typically found in the `__snapshots` folder), should be committed to source control alongside any code changes.

On the first run (when the snapshot file doesn't yet exist), the snapshot is created, stored to disk, and the test is passed. On all subsequent runs, the given data is compared to the on-disk snapshot, and the test fails if they don't match. Failure means that some change occured, so either a bug or a known implementation changed.
On the first run (when the snapshot file doesn't yet exist), the snapshot is created, stored to disk, and the test is passed. On all subsequent runs, the given data is compared to the on-disk snapshot, and the test fails if they don't match. Failure means that some change occurred, so either a bug or a known implementation changed.

#### Updating Snapshots

Expand Down