From b1c164add0a93b28e6d2bb45331f0857c434ea4b Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Fri, 20 Dec 2024 16:51:54 -0800 Subject: [PATCH] Skip GUI tests on Windows and Linux --- setup.cfg | 1 + tests/pyqttoast_test.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/setup.cfg b/setup.cfg index 58bab51..d9c9fd4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -323,6 +323,7 @@ per-file-ignores = build-tools/generate_settngs.py: T20 build-tools/oidc-exchange.py: T20 tests/*: L + tests/pyqttoast_test.py: E402 [mypy] exclude = comictaggerlib/graphics/resources.py diff --git a/tests/pyqttoast_test.py b/tests/pyqttoast_test.py index 602aa27..8e9791e 100644 --- a/tests/pyqttoast_test.py +++ b/tests/pyqttoast_test.py @@ -1,10 +1,13 @@ from __future__ import annotations +import platform from unittest.mock import patch import pytest pytest.importorskip("PyQt5") +if platform.platform != "Darwin": + raise pytest.skip.Exception("GUI Testing sucks", allow_module_level=True) from PyQt5.QtCore import QMargins, QRect, QSize, Qt from PyQt5.QtGui import QColor, QFont, QGuiApplication, QPixmap from PyQt5.QtWidgets import QMainWindow