-
Notifications
You must be signed in to change notification settings - Fork 40
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
How to use Syrupy to save custom objects without converting them to strings #786
Comments
That line can be updated to do an explicit "None" check. Are you interested in contributing / opening a PR? |
Yes I would be very happy to! I would open a PR in sometime today! |
@noahnu Would you mind looking at #789? Is the change alright? Also could you please review my code a bit as well? Is it safe to extend the class in the way I did from a sustainability perspective? We are planning to add this library for our tests in TARDIS- https://tardis-sn.github.io/, https://github.com/tardis-sn and might be doing this across several repos. Could the classes I made stay as is for at least 3-4 years? |
Yes the API you're using is stable. I was thinking about renaming some of the methods to remove the underscore, however I have no immediate plans to do so, and if that happens, it'd be in a new major version with a migration guide. |
Dear Syrupy Team,
Thank you for this great package. I wanted to extend the
SingleFileSnapshotExtension
to save Pandas and NumPy objects to HDF files and.dat
files respectively. I used the functions that you mentioned could be overridden(except theserialize
function) to save these files in these new formats. However this specific line inget_assert_diff
is causing an error that I just can't get past.Both Dataframes and Arrays have no bool values, which is why doing something like
dataframe or ""
raises a ValueError.Any help on how I can get past this error? Am I doing the wrong thing?

Here are a few references-
Here is the extension that I wrote-
https://github.com/atharva-2001/syrupy-pandas-numpy/blob/main/tests/test_pd.py
The text was updated successfully, but these errors were encountered: