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

Update Tests for better pandas df snapshots #112

Closed
jcharkow opened this issue Feb 20, 2024 · 3 comments
Closed

Update Tests for better pandas df snapshots #112

jcharkow opened this issue Feb 20, 2024 · 3 comments
Labels
tests Unit tests

Comments

@jcharkow
Copy link
Collaborator

Issue:

Currently, snapshots using a pandas dataframe seem to be broken to me as it is not actually checking the entire dataframe just sections of this.

image

One option I've considered is converting to dictionaries however sometimes tests still fail because dictionaries have no order in their columns.

Currently, the best solution I can find is using a custom extension of syrupy which allows for snapshots with pandas dataframes. I am currently working on that in the https://github.com/Roestlab/massdash/tree/test/add_tests branch.

This would require additional dependencies of pytest and syrupy however I think it is worth it. @singjc @irahorecka please let me know your thoughts

@jcharkow jcharkow changed the title Update Tests Update Tests for better pandas df snapshots Feb 20, 2024
@singjc singjc added the tests Unit tests label Feb 26, 2024
@singjc
Copy link
Collaborator

singjc commented Feb 26, 2024

@jcharkow @irahorecka I think we should add unittests for the main stream app as well.

https://docs.streamlit.io/library/api-reference/app-testing

@jcharkow
Copy link
Collaborator Author

I am working on this in https://github.com/Roestlab/massdash/tree/test/gui_tests

@jcharkow jcharkow mentioned this issue Feb 29, 2024
3 tasks
@jcharkow
Copy link
Collaborator Author

Closing this because Pandas Df snapshots have been added. Note: We still have to do streamlit tests

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

No branches or pull requests

2 participants