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

Fix tests: use npe1 version (0.1.2) of napari-ndtiffs #277

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

psobolewskiPhD
Copy link
Member

the testfetch_manifest_with_full_install in test_fetch.py uses assert isinstance(mf, NPE1Adapter) for napari-ndtiffs:

npe2/tests/test_fetch.py

Lines 72 to 78 in d7329b7

@pytest.mark.skipif(not os.getenv("CI"), reason="slow, only run on CI")
def testfetch_manifest_with_full_install():
# TODO: slowest of the tests ... would be nice to provide a local mock
mf = fetch_manifest_with_full_install("napari-ndtiffs")
assert isinstance(mf, NPE1Adapter)
assert mf.name == "napari-ndtiffs"
assert mf.contributions

Recently, that plugin was updated to use npe2, so as a result the test fails.
See also discussion starting here: #275 (comment)

This PR passes the version argument to use version 0.1.2 of the plugin which is npe1. This is the simple fix to keep the test working as it has.

However, maybe it's best to just drop that NPE1 assert, because I'm not sure it matters that the plugin is or isn't npe1—there are two specific npe1 shim tests already.
So then here we would only assert the name and contributions.

PS. my OCD wants to fix the name to test_fetch... but not sure that's ok? 🤣

cc: @tlambert03 @Czaki

@codecov
Copy link

codecov bot commented Apr 2, 2023

Codecov Report

Merging #277 (1fb7c1b) into main (d7329b7) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main      #277   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           37        37           
  Lines         2813      2813           
=========================================
  Hits          2813      2813           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@Czaki Czaki left a comment

Choose a reason for hiding this comment

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

We could start with this workaround until someone will find more time to implement it better (if needed)

@Czaki Czaki merged commit 2bf8655 into napari:main Apr 3, 2023
@tlambert03 tlambert03 added the tests related to testing or CI label Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests related to testing or CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants