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

CLI option to update snapshots without running other tests #922

Open
nolanbconaway opened this issue Nov 19, 2024 · 0 comments
Open

CLI option to update snapshots without running other tests #922

nolanbconaway opened this issue Nov 19, 2024 · 0 comments
Labels
feature request New feature or request good first issue Good for newcomers

Comments

@nolanbconaway
Copy link

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

I am using syrupy in a few libraries, and I find myself in a common pattern in which I write a Makefile target like make snapshot-update which invokes pytest --snapshot-update. But the real intention behind that make target is not necessarily to run all the tests and update snapshots; but to update the snapshots only.

Describe the solution you'd like

I think it'd be a neat feature to support a pytest selector which isolates only the tests depending on the snapshot fixture; so that pytest --snapshot-update could be extended to only run tests with any snapshots.

Describe alternatives you've considered

It's not a big deal! I just run all my tests when i run updates. 😄

Additional context

@noahnu noahnu added feature request New feature or request good first issue Good for newcomers labels Nov 23, 2024
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
None yet
Development

No branches or pull requests

2 participants