-
Notifications
You must be signed in to change notification settings - Fork 37
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
Bug for subfolders in matches_snapshot_location #918
Comments
Actually, I think the bug comes from the discovery process. |
Well it's very confusing and I'm not sure how best to solve.
I'm not sure how to get around that... |
I think the check should be adjusted in the report - maybe looping through the extensions again |
Note: a workaround was implemented in home-assistant/core#129946 But I do believe that:
|
Describe the bug
PyTestLocation.PyTestLocation
does not correct take into account sub-folderssyrupy/src/syrupy/location.py
Lines 117 to 121 in e337c88
This can be seen on Home Assistant repository, runing
pytest --snapshot-details tests/components/config/test_config_entries.py tests/test_config.py
will incorrect identify unused snapshotsThe structure looks like this:
/tests/test_config.py
/tests/snapshots/test_config.ambr
/tests/test_config_entries.py
/tests/snapshots/test_config_entries.ambr
/tests/components/config/test_config_entries.py
/tests/components/config/snapshots/test_config_entries.ambr
I would expect
tests/snapshots/test_config_entries.ambr
to be fully ignored, and not to be marked as unused.The text was updated successfully, but these errors were encountered: