-
Notifications
You must be signed in to change notification settings - Fork 157
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
(fix): move zarr import inside try-catch in test helpers #1343
Conversation
anndata/tests/helpers.py
Outdated
class AccessTrackingStore: | ||
def __init__(self) -> None: | ||
raise ImportError( | ||
"zarr must be imported to create an `AccessTrackingStore` instance." | ||
) |
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 a huge fan of this, but I think the other option is to create AccessTrackingStore
based on some dummy base class, which will error out on construction with a less helpful error. And if we want to raise an error, we're sort of back to this.
I think an |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1343 +/- ##
==========================================
- Coverage 85.71% 83.49% -2.23%
==========================================
Files 34 34
Lines 5455 5460 +5
==========================================
- Hits 4676 4559 -117
- Misses 779 901 +122
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Co-authored-by: Isaac Virshup <[email protected]>
…elpers (#1347) Co-authored-by: Ilan Gold <[email protected]>
Is there some sort of way to test this? Open to suggestions.
ruff
does not support custom rules, I think?