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: preserve Falsy values in assertion diff function #789

Merged
merged 3 commits into from
Aug 17, 2023

Conversation

atharva-2001
Copy link
Contributor

Description

This PR does a None check here-https://github.com/tophat/syrupy/blob/f4bc8453466af2cfa75cdda1d50d67bc8c4396c3/src/syrupy/assertion.py#L209

This helps me extend the SingleFileSnapshotExtension to save snapshots as HDF files. Please see issue #786 to know more.

Related Issues

Closes #786

Checklist

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

Additional Comments

No additional comments.

src/syrupy/assertion.py Outdated Show resolved Hide resolved
@noahnu noahnu changed the title None check in get_assert_diff function fix: preserve Falsy values in assertion diff function Aug 17, 2023
@noahnu noahnu merged commit 118ef92 into syrupy-project:main Aug 17, 2023
@noahnu
Copy link
Collaborator

noahnu commented Aug 17, 2023

@all-contributors add @atharva-2001 for code

@allcontributors
Copy link
Contributor

@noahnu

I've put up a pull request to add @atharva-2001! 🎉

tophat-opensource-bot pushed a commit that referenced this pull request Aug 17, 2023
## [4.1.1](v4.1.0...v4.1.1) (2023-08-17)

### Bug Fixes

* preserve Falsy values in assertion diff function ([#789](#789)) ([118ef92](118ef92))
@tophat-opensource-bot
Copy link
Contributor

🎉 This PR is included in version 4.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@atharva-2001
Copy link
Contributor Author

Thank you!!

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.

How to use Syrupy to save custom objects without converting them to strings
3 participants