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

test(coloc): add coloc semantic test #538

Merged
merged 2 commits into from
Mar 13, 2024
Merged

test(coloc): add coloc semantic test #538

merged 2 commits into from
Mar 13, 2024

Conversation

ireneisdoomed
Copy link
Contributor

This is practically the implementation of the same semantic test but benefitting from pytest parametrising function to define the same testing logic for both scenarios.

Writing data inside the decorator is a pain (mainly getting the parenthesis right), but once it is sorted, it is much more legible than defining fixtures for semantic tests inside conftest.

I also switched the way to compare results to Pandas assert_frame_equal which is useful in cases where the floating point might vary.
Have a look at it and let me know your thoughts @xyg123

@ireneisdoomed ireneisdoomed changed the base branch from dev to pytest_coloc March 12, 2024 21:58
Copy link
Contributor

@xyg123 xyg123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much Irene! It looks really good! I'll put through the test examples through R and change the expected as needed!

@xyg123 xyg123 merged commit 5e58c4f into pytest_coloc Mar 13, 2024
4 checks passed
xyg123 added a commit that referenced this pull request Mar 21, 2024
* fix: pytest for coloc unit tests

* fix: removed unused coloc tests

* test(coloc): add coloc semantic test (#538)

* test(coloc): define fixtures and parametrise coloc tests

* test(coloc): compare dfs with assert_frame_equal

* fix: remove unused threshold variable

---------

Co-authored-by: Irene López <45119610+ireneisdoomed@users.noreply.github.com>
Co-authored-by: David Ochoa <ochoa@ebi.ac.uk>
@ireneisdoomed ireneisdoomed deleted the il-pytest-coloc branch July 15, 2024 14:46
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