diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c42a792..d3c1ee78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/pyproject.toml b/pyproject.toml index d60bc7e7..faf99a7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,6 +56,7 @@ testing = [ "pytest", "pytest-cov", "jsonschema", + "pytest-pretty", ] dev = ["black", "ipython", "isort", "mypy", "pre-commit"] docs = ["Jinja2", "magicgui>=0.3.3"] diff --git a/tests/test_fetch.py b/tests/test_fetch.py index 6f03f377..241b8569 100644 --- a/tests/test_fetch.py +++ b/tests/test_fetch.py @@ -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" @@ -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", ], diff --git a/tests/test_pytest_plugin.py b/tests/test_pytest_plugin.py index b0d83e3d..45f6775d 100644 --- a/tests/test_pytest_plugin.py +++ b/tests/test_pytest_plugin.py @@ -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)