# forge.testing.snapshot

```python
forge.testing.snapshot(value: object, *, name: str | None = None, tolerance: Mapping[str, float] | None = None, path: str | os.PathLike[str] | None = None) -> None
```

Compare a run, or a mapping of numbers, with the snapshot stored for this test.

The file is ``path``, or ``__snapshots__/<test file>/<name or test function>.json`` beside the
test file. With ``--update-snapshots`` (or ``FORGE_UPDATE_SNAPSHOTS=1``) the file is written
instead, and a missing file is otherwise a failure. ``tolerance`` maps a field's dotted path or
last key to the relative and absolute tolerance its number may move by.

Since Forge API 1.
