diff options
Diffstat (limited to 'sources/pyside2/tests/QtWidgets')
6 files changed, 34 insertions, 34 deletions
diff --git a/sources/pyside2/tests/QtWidgets/bug_307.py b/sources/pyside2/tests/QtWidgets/bug_307.py index 4e5ecab45..0a0e9faa5 100644 --- a/sources/pyside2/tests/QtWidgets/bug_307.py +++ b/sources/pyside2/tests/QtWidgets/bug_307.py @@ -37,9 +37,9 @@ class Test (QApplication) : def __init__(self, argv) : super(Test, self).__init__(argv) self._called = False - + def called(self): - self._called = True + self._called = True class QApplicationSignalsTest(unittest.TestCase): @@ -49,6 +49,6 @@ class QApplicationSignalsTest(unittest.TestCase): app.connect(button, SIGNAL("clicked()"), app.called) button.click() self.assertTrue(app._called) - + if __name__ == '__main__': unittest.main() diff --git a/sources/pyside2/tests/QtWidgets/bug_338.py b/sources/pyside2/tests/QtWidgets/bug_338.py index 27957a032..e51cb1523 100644 --- a/sources/pyside2/tests/QtWidgets/bug_338.py +++ b/sources/pyside2/tests/QtWidgets/bug_338.py @@ -47,9 +47,9 @@ class BugTest(unittest.TestCase): scene = QtWidgets.QGraphicsScene() item = DiagramItem() item2 = DiagramItem() - #this cause segfault + #this cause segfault scene.addItem(item) scene.addItem(item2) - + if __name__ == "__main__": - unittest.main()
\ No newline at end of file + unittest.main() diff --git a/sources/pyside2/tests/QtWidgets/bug_688.py b/sources/pyside2/tests/QtWidgets/bug_688.py index 716d88df3..2bab2050a 100644 --- a/sources/pyside2/tests/QtWidgets/bug_688.py +++ b/sources/pyside2/tests/QtWidgets/bug_688.py @@ -38,20 +38,20 @@ class BugTest(UsesQApplication): editor = QTextEdit() cursor = QTextCursor(editor.textCursor()) cursor.movePosition(QTextCursor.Start) - + mainFrame = cursor.currentFrame() - + plainCharFormat = QTextCharFormat() boldCharFormat = QTextCharFormat() boldCharFormat.setFontWeight(QFont.Bold); cursor.insertText(""" - Text documents are represented by the - QTextDocument class, rather than by QString objects. - Each QTextDocument object contains information about - the document's internal representation, its structure, - and keeps track of modifications to provide undo/redo - facilities. This approach allows features such as the - layout management to be delegated to specialized + Text documents are represented by the + QTextDocument class, rather than by QString objects. + Each QTextDocument object contains information about + the document's internal representation, its structure, + and keeps track of modifications to provide undo/redo + facilities. This approach allows features such as the + layout management to be delegated to specialized classes, but also provides a focus for the framework.""", plainCharFormat) @@ -62,28 +62,28 @@ class BugTest(UsesQApplication): cursor.insertFrame(frameFormat) cursor.insertText(""" - Documents are either converted from external sources - or created from scratch using Qt. The creation process - can done by an editor widget, such as QTextEdit, or by + Documents are either converted from external sources + or created from scratch using Qt. The creation process + can done by an editor widget, such as QTextEdit, or by explicit calls to the Scribe API.""", boldCharFormat) cursor = mainFrame.lastCursorPosition() cursor.insertText(""" - There are two complementary ways to visualize the - contents of a document: as a linear buffer that is - used by editors to modify the contents, and as an - object hierarchy containing structural information - that is useful to layout engines. In the hierarchical - model, the objects generally correspond to visual - elements such as frames, tables, and lists. At a lower - level, these elements describe properties such as the - style of text used and its alignment. The linear - representation of the document is used for editing and + There are two complementary ways to visualize the + contents of a document: as a linear buffer that is + used by editors to modify the contents, and as an + object hierarchy containing structural information + that is useful to layout engines. In the hierarchical + model, the objects generally correspond to visual + elements such as frames, tables, and lists. At a lower + level, these elements describe properties such as the + style of text used and its alignment. The linear + representation of the document is used for editing and manipulation of the document's contents.""", plainCharFormat) - + frame = cursor.currentFrame() items = [] @@ -110,7 +110,7 @@ class BugTest(UsesQApplication): b.__isub__(1) i -= 1 - + if __name__ == '__main__': unittest.main() diff --git a/sources/pyside2/tests/QtWidgets/qfontdialog_test.py b/sources/pyside2/tests/QtWidgets/qfontdialog_test.py index dd9980c90..09e9b7173 100644 --- a/sources/pyside2/tests/QtWidgets/qfontdialog_test.py +++ b/sources/pyside2/tests/QtWidgets/qfontdialog_test.py @@ -42,7 +42,7 @@ class TestFontDialog(TimedQApplication): def testGetFontQDialog(self): QtWidgets.QFontDialog.getFont(QtGui.QFont("FreeSans",10)) - + def testGetFontQDialogQString(self): QtWidgets.QFontDialog.getFont(QtGui.QFont("FreeSans",10), None, "Select font") diff --git a/sources/pyside2/tests/QtWidgets/qgraphicsitem_isblocked_test.py b/sources/pyside2/tests/QtWidgets/qgraphicsitem_isblocked_test.py index 7565fd99a..345ea7c45 100644 --- a/sources/pyside2/tests/QtWidgets/qgraphicsitem_isblocked_test.py +++ b/sources/pyside2/tests/QtWidgets/qgraphicsitem_isblocked_test.py @@ -36,13 +36,13 @@ from PySide2 import QtWidgets from helper import UsesQApplication class Item(QtWidgets.QGraphicsItem): - + def __init__(self): QtWidgets.QGraphicsItem.__init__(self) def boundingRect(self): return QtCore.QRectF(0, 0, 100, 100) - + def paint(self, painter, option, widget): painter.setBrush(QtGui.QColor(255, 255, 255)) painter.drawRect(0, 0, 100, 100) diff --git a/sources/pyside2/tests/QtWidgets/reference_count_test.py b/sources/pyside2/tests/QtWidgets/reference_count_test.py index 836020ad9..c2a0ec979 100644 --- a/sources/pyside2/tests/QtWidgets/reference_count_test.py +++ b/sources/pyside2/tests/QtWidgets/reference_count_test.py @@ -75,7 +75,7 @@ class ReferenceCount(UsesQApplication): global destroyedPol self.beforeTest() - + rect = self.scene.addRect(10.0, 10.0, 10.0, 10.0) self.assertTrue(isinstance(rect, QGraphicsRectItem)) |