pytest-snapshot icon indicating copy to clipboard operation
pytest-snapshot copied to clipboard

A plugin for snapshot testing with pytest.

Results 10 pytest-snapshot issues
Sort by recently updated
recently updated
newest added

Hi! Thanks for the library, I use it extensively in one of my projects with great success. Recently, I ran into an unfortunate edge-case in the default directory selection logic....

I want to share a little monkey patch I apply to the `Snapshot` class. It fixes three small annoyances: 1. If the current value is different, then create a `"*.dump"`...

This pull request improves type annotations in the package, making it [PEP 561](https://peps.python.org/pep-0561/#packaging-type-information)-compatible. In details: - Adds `py.typed` marker. - Adds `mypy` and `pyright` tox environments to ensure full compatibility...

Hi, This tool is really remarkably good! As in issue #54, I needed some kind of dump file to make data visualization comparisons in diff tools simpler on failed snapshot...

Hi! After updating pytest to 8.x we are seeing test failures with pytest-snapshot 0.9.0 over in nixpkgs. ```pytb ============================= test session starts ============================== platform linux -- Python 3.11.8, pytest-8.0.2, pluggy-1.4.0...

Is there a way to exclude a list of fields from the json response of an API while testing with snapshot? For example if there are keys like `updated_at`, a...

I have a test that checks some config objects that contains refs to callable functions like this: ```py @dataclass class ExportConfig: sql_query: str output_file: Path format_fields: dict[ str, Callable[[Any], Any],...

I saw this issue, https://github.com/joseph-roitman/pytest-snapshot/issues/61 where a linting rule was adding a newline at the end of a file. I have a similar problem where my editor is configured to...

This [line](https://github.com/joseph-roitman/pytest-snapshot/blob/master/pytest_snapshot/plugin.py#L174): ```py if encoded_expected_value is None or encoded_value != encoded_expected_value: ``` is using `!=` rather than relying on the internal `compare` function, which means that this code cannot be...