aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtQml/connect_python_qml.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/QtQml/connect_python_qml.py')
-rw-r--r--sources/pyside6/tests/QtQml/connect_python_qml.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/sources/pyside6/tests/QtQml/connect_python_qml.py b/sources/pyside6/tests/QtQml/connect_python_qml.py
index 47e0fdae0..40b695b95 100644
--- a/sources/pyside6/tests/QtQml/connect_python_qml.py
+++ b/sources/pyside6/tests/QtQml/connect_python_qml.py
@@ -42,7 +42,7 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1]))
from init_paths import init_test_paths
init_test_paths(False)
-from helper.helper import adjust_filename
+from helper.helper import quickview_errorstring
from helper.timedqapplication import TimedQApplication
from PySide6 import QtCore, QtGui, QtQuick
@@ -59,8 +59,11 @@ class TestConnectionWithInvalidSignature(TimedQApplication):
self.buttonClicked = False
self.buttonFailClicked = False
view = QtQuick.QQuickView()
- view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('connect_python_qml.qml', __file__)))
+ file = Path(__file__).resolve().parent / 'connect_python_qml.qml'
+ self.assertTrue(file.is_file())
+ view.setSource(QtCore.QUrl.fromLocalFile(os.fspath(file)))
root = view.rootObject()
+ self.assertTrue(root, quickview_errorstring(view))
button = root.findChild(QtCore.QObject, "buttonMouseArea")
self.assertRaises(TypeError, QtCore.QObject.connect, [button,QtCore.SIGNAL('entered()'), self.onButtonFailClicked])
button.entered.connect(self.onButtonClicked)