From ac318c50bc5d8efd4b5d98e27e7cb0b5a4606b5f Mon Sep 17 00:00:00 2001 From: giumas Date: Sat, 27 Apr 2024 19:36:51 +0200 Subject: [PATCH] skipped QWebEngine tests on Linux --- tests/app/browser/test_browser.py | 4 +++- tests/app/browser/test_browser_download_widget.py | 5 +++-- tests/app/browser/test_web_renderer.py | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/app/browser/test_browser.py b/tests/app/browser/test_browser.py index 0d541b5..c9dbc06 100644 --- a/tests/app/browser/test_browser.py +++ b/tests/app/browser/test_browser.py @@ -1,5 +1,5 @@ import unittest -import platform +import sys from PySide6 import QtCore, QtWidgets, QtTest @@ -8,6 +8,7 @@ class TestAppBrowserBrowser(unittest.TestCase): + @unittest.skipIf(sys.platform == "linux", "Skip QWebEngine on Linux") def test_change_url(self): if not QtWidgets.QApplication.instance(): @@ -21,6 +22,7 @@ def test_change_url(self): w.change_url(new_url) self.assertEqual(new_url, w.url()) + @unittest.skipIf(sys.platform == "linux", "Skip QWebEngine on Linux") def test_type_url(self): if not QtWidgets.QApplication.instance(): diff --git a/tests/app/browser/test_browser_download_widget.py b/tests/app/browser/test_browser_download_widget.py index ae6dd59..0e1228b 100644 --- a/tests/app/browser/test_browser_download_widget.py +++ b/tests/app/browser/test_browser_download_widget.py @@ -1,12 +1,13 @@ import unittest +import sys -from PySide6 import QtCore, QtWidgets, QtTest, QtWebEngineWidgets +from PySide6 import QtWidgets, QtWebEngineWidgets from hyo2.abc2.app.browser.download_widget import DownloadWidget class TestAppBrowserDownloadWidget(unittest.TestCase): - + @unittest.skipIf(sys.platform == "linux", "Skip QWebEngine on Linux") def test_download(self): if not QtWidgets.QApplication.instance(): diff --git a/tests/app/browser/test_web_renderer.py b/tests/app/browser/test_web_renderer.py index f62b463..13fd746 100644 --- a/tests/app/browser/test_web_renderer.py +++ b/tests/app/browser/test_web_renderer.py @@ -1,4 +1,5 @@ import unittest +import sys from PySide6 import QtWidgets @@ -7,6 +8,7 @@ class TestWebRenderer(unittest.TestCase): + @unittest.skipIf(sys.platform == "linux", "Skip QWebEngine on Linux") def test_init(self): # noinspection PyArgumentList if not QtWidgets.QApplication.instance():