diff options
Diffstat (limited to 'sources/pyside2/tests/QtQml/registertype.py')
-rw-r--r-- | sources/pyside2/tests/QtQml/registertype.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sources/pyside2/tests/QtQml/registertype.py b/sources/pyside2/tests/QtQml/registertype.py index 7e6fe8d29..e4dcd36f9 100644 --- a/sources/pyside2/tests/QtQml/registertype.py +++ b/sources/pyside2/tests/QtQml/registertype.py @@ -36,7 +36,7 @@ init_test_paths(False) from helper.helper import adjust_filename -from PySide2.QtCore import Property, QTimer, QUrl +from PySide2.QtCore import Property, QObject, QTimer, QUrl from PySide2.QtGui import QGuiApplication, QPen, QColor, QPainter from PySide2.QtQml import qmlRegisterType, ListProperty from PySide2.QtQuick import QQuickView, QQuickItem, QQuickPaintedItem @@ -108,8 +108,8 @@ class TestQmlSupport(unittest.TestCase): def testIt(self): app = QGuiApplication([]) - qmlRegisterType(PieChart, 'Charts', 1, 0, 'PieChart'); - qmlRegisterType(PieSlice, "Charts", 1, 0, "PieSlice"); + self.assertTrue(qmlRegisterType(PieChart, 'Charts', 1, 0, 'PieChart') != -1) + self.assertTrue(qmlRegisterType(PieSlice, "Charts", 1, 0, "PieSlice") != -1) view = QQuickView() view.setSource(QUrl.fromLocalFile(adjust_filename('registertype.qml', __file__))) |