Skip to content

CLI option to update snapshots without running other tests #922

Open
@nolanbconaway

Description

@nolanbconaway

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions