Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store snapshot diff without storing previous snapshot #608

Open
freshollie opened this issue Aug 11, 2022 · 2 comments
Open

Store snapshot diff without storing previous snapshot #608

freshollie opened this issue Aug 11, 2022 · 2 comments
Labels
feature request New feature or request good first issue Good for newcomers

Comments

@freshollie
Copy link

Is your feature request related to a problem? Please describe.

Current API requires you you to store a previous snapshot before the next "diff" can be stored.

For example

    assert result == snapshot
    assert result_after_something_happens == snapshot(diff=0)

If my test just depends on the diff snapshot (checking that the changes always remain the same) it's not possible to only snapshot the diff.

Describe the solution you'd like

I'd be great if I could do something like this:

    assert result_after_something_happens == snapshot(diff=result)
@noahnu
Copy link
Collaborator

noahnu commented Aug 11, 2022

This sounds reasonable to me. Would you be interested in trying your hand at contributing with a pull request? Otherwise, I'll add this to my backlog.

@freshollie
Copy link
Author

I'll have a go at a PR over the next week or so :)

@noahnu noahnu added the feature request New feature or request label Jan 3, 2023
@noahnu noahnu added the good first issue Good for newcomers label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

2 participants