syrupy-project / syrupy

:pancakes: The sweeter pytest snapshot plugin
https://syrupy-project.github.io/syrupy/
Apache License 2.0
550 stars 36 forks source link

Identifying unused snapshots #899

Open epenet opened 1 month ago

epenet commented 1 month ago

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

We know there are unused snapshots, but it is very hard to identify where they are.

Describe the solution you'd like

It would be nice to have a way to identify the individual unused snapshots

Describe alternatives you've considered

Additional context

See https://github.com/home-assistant/core/pull/128162 Due to xdist incompatility, we are unable to identify the unused snapshots as soon as they enter the codebase.

noahnu commented 1 month ago

There's a --snapshot-details flag you can pass to pytest. See https://github.com/syrupy-project/syrupy#cli-options. Let me know if that's sufficient for your use case.

epenet commented 1 month ago

There's a --snapshot-details flag you can pass to pytest. See https://github.com/syrupy-project/syrupy#cli-options. Let me know if that's sufficient for your use case.

It would be sufficient if it worked with xdist... but that doesn't work. I've started work on #901, and it kind of works on my machine but I can't get it inside the Home Assistant CI