Skip to content

fix: allow snapshot dir to be different#892

Merged
noahnu merged 2 commits intosyrupy-project:mainfrom
joostlek:fix-dir-issue
Oct 6, 2024
Merged

fix: allow snapshot dir to be different#892
noahnu merged 2 commits intosyrupy-project:mainfrom
joostlek:fix-dir-issue

Conversation

@joostlek
Copy link
Copy Markdown
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
Copy Markdown
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
@noahnu
Copy link
Copy Markdown
Collaborator

noahnu commented Oct 6, 2024

@all-contributors add @joostlek for code

@allcontributors
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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