diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-04-29 11:18:49 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-04-29 15:56:58 +0200 |
| commit | 6d2af409eedee377b3c2ba0cd8156b9409fabd9d (patch) | |
| tree | 660f8fd87f77c1030cf97cc65345b9a941a321e4 /sources/pyside6/tests/QtWidgets/api2_test.py | |
| parent | 88fff87519e741a3a999b8c1545834d116859faa (diff) | |
Tests: Fix some space-related flake8 warnings
Change-Id: I9b0ad08839bf1246620c557ec304dfa90882907b
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside6/tests/QtWidgets/api2_test.py')
| -rw-r--r-- | sources/pyside6/tests/QtWidgets/api2_test.py | 11 |
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() |
