From bb708e9d589ede15ee0d7f2d83d7fe86916999df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Pe=C3=B1a-Castellanos?= Date: Mon, 27 May 2024 19:35:12 -0500 Subject: [PATCH] Skip failing tests and use macos13 worker --- .github/workflows/test_and_deploy.yml | 2 +- .../_tests/test_qt_plugin_dialog.py | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 09a7495..f9409d1 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - platform: [ubuntu-latest, windows-latest, macos-latest] + platform: [ubuntu-latest, windows-latest, macos-13] python-version: ["3.9", "3.10", "3.11"] napari: ["latest", "repo"] exclude: diff --git a/napari_plugin_manager/_tests/test_qt_plugin_dialog.py b/napari_plugin_manager/_tests/test_qt_plugin_dialog.py index 047d82b..daafb20 100644 --- a/napari_plugin_manager/_tests/test_qt_plugin_dialog.py +++ b/napari_plugin_manager/_tests/test_qt_plugin_dialog.py @@ -1,4 +1,5 @@ import importlib.metadata +import platform import sys from typing import Generator, Optional, Tuple from unittest.mock import patch @@ -10,16 +11,18 @@ from napari.plugins._tests.test_npe2 import mock_pm # noqa from napari.utils.translations import trans -from napari_plugin_manager import qt_plugin_dialog -from napari_plugin_manager.qt_package_installer import InstallerActions - -if qtpy.API_NAME == 'PySide2' and sys.version_info[:2] == (3, 11): +if (qtpy.API_NAME == 'PySide2' and platform.system() != "Linux") or ( + sys.version_info[:2] > (3, 10) and platform.system() == "Linux" +): pytest.skip( - "Known PySide2 x Python 3.11 incompatibility: " - "TypeError: 'PySide2.QtCore.Qt.Alignment' object cannot be interpreted as an integer", + "Known PySide2 x Python incompatibility: " + "... object cannot be interpreted as an integer", allow_module_level=True, ) +from napari_plugin_manager import qt_plugin_dialog +from napari_plugin_manager.qt_package_installer import InstallerActions + N_MOCKED_PLUGINS = 2