Skip to content

Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.

Qt tests: skip ParityWindowTests when PySide6 is not installed

LNPANDY1a63e7a029d3
diff --git a/frontend-qt/tests/test_swift_parity.py b/frontend-qt/tests/test_swift_parity.py
index 68be0bfc..59c8e7d9 100644
--- a/frontend-qt/tests/test_swift_parity.py
+++ b/frontend-qt/tests/test_swift_parity.py
@@ -214,7 +214,10 @@ class LibraryAndSpaceTests(unittest.TestCase):
class ParityWindowTests(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
- from PySide6.QtWidgets import QApplication
+ try:
+ from PySide6.QtWidgets import QApplication
+ except ImportError as e:
+ raise unittest.SkipTest(f'PySide6 not installed: {e}')
cls.app = QApplication.instance() or QApplication([])
def _delete(self, m, w) -> None: