Skip to content

Commit

Permalink
Merge branch 'main' into fix_canceling_workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki authored Oct 13, 2023
2 parents 70f6828 + cb5ba4a commit 59e537c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
python -m pip install -e ./napari-from-github -c "./napari-from-github/resources/constraints/constraints_py3.10.txt"
python -m pip install -e .[json]
# bare minimum required to test napari/plugins
python -m pip install pytest scikit-image[data] zarr xarray hypothesis matplotlib
python -m pip install pytest pytest-pretty scikit-image[data] zarr xarray hypothesis matplotlib
- name: Run napari plugin headless tests
run: pytest -W 'ignore::DeprecationWarning' napari/plugins napari/settings napari/layers napari/components
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ testing = [
"pytest",
"pytest-cov",
"jsonschema",
"pytest-pretty",
]
dev = ["black", "ipython", "isort", "mypy", "pre-commit"]
docs = ["Jinja2", "magicgui>=0.3.3"]
Expand Down
3 changes: 2 additions & 1 deletion tests/test_fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def test_fetch_npe2_manifest():
assert mf.npe1_shim is False


@pytest.mark.skip("package looks deleted from pypi")
def test_fetch_npe1_manifest_with_writer():
mf = fetch_manifest("example-plugin")
assert mf.name == "example-plugin"
Expand Down Expand Up @@ -108,7 +109,7 @@ def test_get_pypi_plugins():
[
"https://files.pythonhosted.org/packages/fb/01/e59bc1d6ac96f84ce9d7a46cc5422250e047958ead6c5693ed386cf94003/napari_dv-0.3.0.tar.gz", # noqa
"https://files.pythonhosted.org/packages/5d/ae/17779e12ce60d8329306963e1a8dec608465caee582440011ff0c1310715/example_plugin-0.0.7-py3-none-any.whl", # noqa
"git+https://github.com/DragaDoncila/example-plugin.git",
# "git+https://github.com/DragaDoncila/example-plugin.git", Draga hide package
# this one doesn't use setuptools_scm, can check direct zip without clone
"https://github.com/jo-mueller/napari-stl-exporter/archive/refs/heads/main.zip",
],
Expand Down
6 changes: 3 additions & 3 deletions tests/test_pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def test_something_6(npe2pm):


@pytest.mark.parametrize("case", [CASE1, CASE2, CASE3, CASE4, CASE5, CASE6])
def test_npe2pm_fixture(pytester: pytest.Pytester, case):
def test_npe2pm_fixture(pytester_pretty: pytest.Pytester, case):
"""Make sure that the npe2pm fixture works."""

# create a temporary pytest test file
pytester.makepyfile(case)
pytester.runpytest().assert_outcomes(passed=1)
pytester_pretty.makepyfile(case)
pytester_pretty.runpytest().assert_outcomes(passed=1)

0 comments on commit 59e537c

Please sign in to comment.