MannLabs / alphapeptstats

Python Package for the downstream analysis of mass-spectrometry-based proteomics data
https://alphapeptstats.readthedocs.io/en/latest/
Apache License 2.0
58 stars 14 forks source link

Draft PR to get feedback on first tests #292

Closed JuliaS92 closed 1 month ago

JuliaS92 commented 2 months ago

I have used the streamlit testing library in combination with mocking of file inputs (thank you @mschwoer for help with that).

I now have 4 tests so far:

In each case I have only asserted the session state and not what the interface actually displays.

This way, we can test if the app runs through and can also make sure that what's persistent between pages is correct, while not affecting testing by aestetic changes to the interface.

I would further be happy to receive suggestions on how to best structure the tests to not duplicate too much code, if I add a test for each software option. (A link to a good example for shared/parameterized setup would be appreciated.)

I will also add tests to make sure the procedurally generated widgets are populated correctly, unless you think this is unnecessary work.

I would not go into testing different input combinations too much, as this is covered by the loader unittests.