Skip to content

Can we add a flag to just skip deletion of snapshots completely when doing --snapshot-update #963

Open
@keeganmccallum

Description

@keeganmccallum

Is your feature request related to a problem? Please describe.
I have a use case where I want to run syrupy/pytest with an argument, on the same test suite. It's convenient and I can't actually run all as part of the same test suite by generating tests anyways due to resource constraints (gen ai use case). All I want, is a way to update the snapshots, without deleting the irrelevant ones, and I'm happy to opt out of any/all deletion behaviour.

Describe the solution you'd like
a simple flag --skip-cleanup or something would be amazing, and solve all my problems

Describe alternatives you've considered

Yes, in theory we could do a bunch of esoteric pytest stuff, and try to enumerate everything, but for this use case it greatly overcomplicates. Plus, we only want to run the snapshots for one given model at a time in practice anyways, and reuse the same test suite vs. having a ton of dupes

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions