-
Notifications
You must be signed in to change notification settings - Fork 22
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 unit tests for python cell_census package #244
Conversation
Codecov Report
@@ Coverage Diff @@
## main #244 +/- ##
==========================================
+ Coverage 83.92% 85.07% +1.15%
==========================================
Files 29 29
Lines 1642 1682 +40
==========================================
+ Hits 1378 1431 +53
+ Misses 264 251 -13
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one nit and one more generic comment (not strictly related to this PR).
|
||
@pytest.mark.live_corpus | ||
def test_download_source_h5ad(tmp_path: pathlib.Path, small_dataset_id: str) -> None: | ||
# with cell_census.open_soma(census_version="latest") as census: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the commented code be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops! Yes, definitely.
@@ -60,6 +63,11 @@ def test_get_census_version_directory(directory_mock: Any) -> None: | |||
assert directory[tag] == cell_census.get_census_version_description(tag) | |||
|
|||
|
|||
def test_get_census_version_description_errors() -> None: | |||
with pytest.raises(KeyError): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not strictly related to the tests, but I was wondering if maybe we don't want to specialize these exceptions? Right now everything is KeyError
or ValueError
but these exceptions map to very specific issues (for instance, non existent census version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes - more/better unit tests for the cell_census python package:
open_soma
and other APIopen_soma
parametersuri_join