aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-04-18 18:58:18 +0200
committerChristian Tismer <tismer@stackless.com>2021-11-19 14:53:57 +0100
commit318cd6643c051c931c95ee094bbff31d49811002 (patch)
treed1446c157c39f5c77600dfdf036f457ba245cd17
parent32c07645b23516dc57a586ec4cd46fd98380d849 (diff)
PyPySide: skip tests which involve __feature__
The __feature__ option needs to be skipped in PyPy. Task-number: PYSIDE-535 Change-Id: I8606c8305c85f2a1418da536f6a937b6845d19fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--sources/pyside6/tests/QtCore/errormessages_with_features_test.py2
-rw-r--r--sources/pyside6/tests/QtCore/feature_with_uic_test.py12
-rw-r--r--sources/pyside6/tests/QtCore/multiple_feature_test.py2
-rw-r--r--sources/pyside6/tests/QtCore/snake_prop_feature_test.py2
4 files changed, 16 insertions, 2 deletions
diff --git a/sources/pyside6/tests/QtCore/errormessages_with_features_test.py b/sources/pyside6/tests/QtCore/errormessages_with_features_test.py
index 72452a588..28b5e0d1d 100644
--- a/sources/pyside6/tests/QtCore/errormessages_with_features_test.py
+++ b/sources/pyside6/tests/QtCore/errormessages_with_features_test.py
@@ -61,6 +61,8 @@ This test is in its own file because combining it with
"""
+@unittest.skipIf(hasattr(sys, "pypy_version_info"),
+ "__feature__ cannot yet be used with PyPy")
class ErrormessagesWithFeatures(unittest.TestCase):
probe = "called with wrong argument types"
probe_miss = "missing signature"
diff --git a/sources/pyside6/tests/QtCore/feature_with_uic_test.py b/sources/pyside6/tests/QtCore/feature_with_uic_test.py
index 09f25e585..bb6cc9b40 100644
--- a/sources/pyside6/tests/QtCore/feature_with_uic_test.py
+++ b/sources/pyside6/tests/QtCore/feature_with_uic_test.py
@@ -62,9 +62,15 @@ from helper.usesqapplication import UsesQApplication
from PySide6.QtCore import QCoreApplication, QLibraryInfo, qVersion
from PySide6.QtWidgets import QApplication, QMainWindow
-from __feature__ import snake_case
+# PYSIDE-535: We cannot use __feature__ in PyPy, yet
+try:
+ from __feature__ import snake_case
-from feature_with_uic.window import Ui_MainWindow
+ from feature_with_uic.window import Ui_MainWindow
+ have_feature = True
+except ImportError:
+ Ui_MainWindow = object
+ have_feature = False
class MainWindow(QMainWindow, Ui_MainWindow):
@@ -74,6 +80,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.setupUi(self)
+@unittest.skipIf(hasattr(sys, "pypy_version_info"),
+ "__feature__ cannot yet be used with PyPy")
class FeatureTest(UsesQApplication):
def testFeaturesWorkWithUIC(self):
diff --git a/sources/pyside6/tests/QtCore/multiple_feature_test.py b/sources/pyside6/tests/QtCore/multiple_feature_test.py
index 0a66075ae..9871baf5c 100644
--- a/sources/pyside6/tests/QtCore/multiple_feature_test.py
+++ b/sources/pyside6/tests/QtCore/multiple_feature_test.py
@@ -63,6 +63,8 @@ There is much more to come.
MethodDescriptorType = type(str.split)
+@unittest.skipIf(hasattr(sys, "pypy_version_info"),
+ "__feature__ cannot yet be used with PyPy")
class FeaturesTest(unittest.TestCase):
def testAllFeatureCombinations(self):
diff --git a/sources/pyside6/tests/QtCore/snake_prop_feature_test.py b/sources/pyside6/tests/QtCore/snake_prop_feature_test.py
index 7925c4c0c..393570e4f 100644
--- a/sources/pyside6/tests/QtCore/snake_prop_feature_test.py
+++ b/sources/pyside6/tests/QtCore/snake_prop_feature_test.py
@@ -64,6 +64,8 @@ class Window(QWidget):
super().__init__()
+@unittest.skipIf(hasattr(sys, "pypy_version_info"),
+ "__feature__ cannot yet be used with PyPy")
class FeatureTest(unittest.TestCase):
def setUp(self):
qApp or QApplication()