Details
-
Bug
-
Resolution: Moved
-
Not Evaluated
-
None
-
5.14.0
-
None
Description
Hi,
I'm enable to run a simple qml file with a qml TestCase :
python
from PySide2.QtGui import QGuiApplication from PySide2.QtQml import QQmlApplicationEngine from os.path import * import sys if _name_ == '_main_': app = QGuiApplication(sys.argv) engine = QQmlApplicationEngine() engine.load(join(dirname(_file_), 'main.qml')) if not engine.rootObjects(): sys.exit(-1) sys.exit(app.exec_())
main.qml :
import QtQuick 2.12 import QtTest 1.2 Item { TestCase { name: "MathTests" function test_math() { compare(2 + 2, 4, "2 + 2 = 4") } }}
I have the following error message :
file:///XXX/untitled/main.qml:6 file:///XXX/untitled/main.qml:6 Type TestCase unavailable file://XXXX/untitled/.venv/lib/python3.7/site-packages/PySide2/Qt/qml/QtTest/TestCase.qml:44 module "Qt.test.qtestroot" is not installed
The file is valid : running from qmltestrunner :
-
-
-
-
-
-
-
-
- Start testing of qmltestrunner *********
Config: Using QtTest library 5.12.6, Qt 5.12.6 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.1 20160406 (Red Hat 5.3.1-6))
PASS : qmltestrunner::MathTests::initTestCase()
PASS : qmltestrunner::MathTests::test_math()
PASS : qmltestrunner::MathTests::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 3ms - Finished testing of qmltestrunner *********
- Start testing of qmltestrunner *********
-
-
-
-
-
-
-
```