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

Add staticmethod to parse base64 encoded images #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

murilo-cunha
Copy link
Contributor

Summary of changes:

  • Add from_base64_image static method
  • Add sample base64 image as a text file
    • Test is not passing :(

Feel free to close this, but I actually had to write this up for my project, so I figured I'd open a PR here too.

Also could not quite figure out how to write the test with syrupy...

@darrenburns
Copy link
Owner

You need to run pytest --snapshot-update to save the snapshot to disk (and check it looks correct).

Then, every time that test runs in the future, it'll validate that the output doesn't change compared to that snapshot.

@murilo-cunha
Copy link
Contributor Author

Ahhh yeah thanks!! That worked perfectly, and all tests passed 🚀

@darrenburns
Copy link
Owner

It should have generated a new snapshot image, which you'll also need to push up to this PR so that when other people run your test, it checks the output of the test against that snapshot :)

@murilo-cunha
Copy link
Contributor Author

There you go! Thanks for the quick response! ⚡ ⚡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants