aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtWidgets/api2_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/QtWidgets/api2_test.py')
-rw-r--r--sources/pyside6/tests/QtWidgets/api2_test.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/sources/pyside6/tests/QtWidgets/api2_test.py b/sources/pyside6/tests/QtWidgets/api2_test.py
index cd60d8a4d..c71de90d3 100644
--- a/sources/pyside6/tests/QtWidgets/api2_test.py
+++ b/sources/pyside6/tests/QtWidgets/api2_test.py
@@ -45,11 +45,13 @@ from PySide6.QtWidgets import QWidget, QSpinBox, QApplication
from helper.usesqapplication import UsesQApplication
+
class WidgetValidatorQInt(QWidget, QIntValidator):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
QIntValidator.__init__(self, parent)
+
class WidgetValidatorQSpinBox(QSpinBox):
def __init__(self, parent=None):
QSpinBox.__init__(self, parent)
@@ -57,6 +59,7 @@ class WidgetValidatorQSpinBox(QSpinBox):
def fixup(self, text):
print("It was called!")
+
class DoubleQObjectInheritanceTest(UsesQApplication):
def testDouble(self):
@@ -64,7 +67,7 @@ class DoubleQObjectInheritanceTest(UsesQApplication):
obj = WidgetValidatorQInt()
- #QIntValidator methods
+ # QIntValidator methods
state, string, number = obj.validate('Test', 0)
self.assertEqual(state, QValidator.Invalid)
state, string, number = obj.validate('33', 0)
@@ -77,11 +80,12 @@ class DoubleQObjectInheritanceTest(UsesQApplication):
obj.setValue(0)
self.assertEqual(obj.value(), 1)
+
class QClipboardTest(UsesQApplication):
def testQClipboard(self):
- #skip this test on MacOS because the clipboard is not available during the ssh session
- #this cause problems in the buildbot
+ # skip this test on macOS because the clipboard is not available during the ssh session
+ # this cause problems in the buildbot
if sys.platform == 'darwin':
return
clip = QApplication.clipboard()
@@ -91,5 +95,6 @@ class QClipboardTest(UsesQApplication):
self.assertEqual(subtype, "plain")
self.assertEqual(text, "Testing this thing!")
+
if __name__ == '__main__':
unittest.main()