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

fix: allow snapshot dir to be different #892

Merged
merged 2 commits into from
Oct 6, 2024

Conversation

joostlek
Copy link
Contributor

@joostlek joostlek commented Sep 25, 2024

Description

This PR aims to allow setting the dirname to something else than __snapshots__ while maintaining the functionality of a failing test suite when snapshots are unused.

Related Issues

Checklist

  • This PR has sufficient documentation.
  • This PR has sufficient test coverage.
  • This PR title satisfies semantic convention.

Additional Comments

I think I changed the test_walk_dir_skips_non_snapshot_path test in a wrong way, but since the function this is testing (walk_snapshot_dir) is always called in context, this isn't a real use case afaict

@noahnu
Copy link
Collaborator

noahnu commented Oct 6, 2024

I think I changed the test_walk_dir_skips_non_snapshot_path test in a wrong way, but since the function this is testing (walk_snapshot_dir) is always called in context, this isn't a real use case afaict

Yeah that seems alright to me. I confirmed walk_snapshot_dir is only ever called with the snapshot dirname. I think it was called with other directories in some previous iteration of the codebase.

@noahnu noahnu merged commit 548ec06 into syrupy-project:main Oct 6, 2024
13 checks passed
@noahnu
Copy link
Collaborator

noahnu commented Oct 6, 2024

@all-contributors add @joostlek for code

Copy link
Contributor

@noahnu

I've put up a pull request to add @joostlek! 🎉

noahnu pushed a commit that referenced this pull request Oct 6, 2024
## [4.7.2](v4.7.1...v4.7.2) (2024-10-06)

### Bug Fixes

* allow snapshot dir to be different ([#892](#892)) ([548ec06](548ec06))
@noahnu
Copy link
Collaborator

noahnu commented Oct 6, 2024

🎉 This PR is included in version 4.7.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@noahnu noahnu added the released label Oct 6, 2024
@joostlek
Copy link
Contributor Author

joostlek commented Oct 6, 2024

This is awesome, thank you so much

@joostlek joostlek deleted the fix-dir-issue branch October 6, 2024 05:32
wbyoung added a commit to wbyoung/watersmart that referenced this pull request Nov 2, 2024
Remove unused snapshots which is possible with syrupy-project/syrupy#892
resolved & also fixes the failing test suite.
wbyoung added a commit to wbyoung/watersmart that referenced this pull request Nov 2, 2024
Remove unused snapshots which is possible with syrupy-project/syrupy#892
resolved & also fixes the failing test suite.
wbyoung added a commit to wbyoung/watersmart that referenced this pull request Nov 2, 2024
Remove unused snapshots which is possible with syrupy-project/syrupy#892
resolved & also fixes the failing test suite.
wbyoung added a commit to wbyoung/watersmart that referenced this pull request Nov 2, 2024
Remove unused snapshots which is possible with syrupy-project/syrupy#892
resolved & also fixes the failing test suite.
wbyoung added a commit to wbyoung/watersmart that referenced this pull request Nov 2, 2024
Remove unused snapshots which is possible with syrupy-project/syrupy#892
resolved & also fixes the failing test suite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overwriting dirname causes test suite not to fail if snapshots unused
2 participants