aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2025-07-04 08:21:38 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2025-07-04 13:13:21 +0200
commit247bdf3786efe36201c91e81e35a460ec6b17dad (patch)
tree509441cdffa2bb1f494a40fb866472e9e6ce6fd4 /sources/pyside6/tests
parent9a87f647acebacc330c7f426465cf0b45e3d1375 (diff)
Add tests that were missing from CMakeLists.txt
Some tests were also missing imports and checks, add them as well. Pick-to: 6.9 Change-Id: Id73b7ab0ec06e5d87613719d0b2f267fa165db77 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/tests')
-rw-r--r--sources/pyside6/tests/QtCore/CMakeLists.txt4
-rw-r--r--sources/pyside6/tests/QtCore/qiodevice_buffered_read_test.py11
-rw-r--r--sources/pyside6/tests/QtCore/qiopipe_test.py12
-rw-r--r--sources/pyside6/tests/QtCore/qsharedmemory_client.py9
-rw-r--r--sources/pyside6/tests/QtGui/CMakeLists.txt1
-rw-r--r--sources/pyside6/tests/QtQml/CMakeLists.txt1
-rw-r--r--sources/pyside6/tests/QtUiTools/CMakeLists.txt1
-rw-r--r--sources/pyside6/tests/QtUiTools/loadUiType_test.py3
-rw-r--r--sources/pyside6/tests/pysidetest/CMakeLists.txt1
-rw-r--r--sources/pyside6/tests/signals/CMakeLists.txt1
10 files changed, 39 insertions, 5 deletions
diff --git a/sources/pyside6/tests/QtCore/CMakeLists.txt b/sources/pyside6/tests/QtCore/CMakeLists.txt
index e21e8c064..5ae2130bf 100644
--- a/sources/pyside6/tests/QtCore/CMakeLists.txt
+++ b/sources/pyside6/tests/QtCore/CMakeLists.txt
@@ -80,6 +80,8 @@ PYSIDE_TEST(qfile_test.py)
PYSIDE_TEST(qfileread_test.py)
PYSIDE_TEST(qflags_test.py)
PYSIDE_TEST(qinstallmsghandler_test.py)
+PYSIDE_TEST(qiodevice_buffered_read_test.py)
+PYSIDE_TEST(qiopipe_test.py)
PYSIDE_TEST(qjsondocument_test.py)
PYSIDE_TEST(qlinef_test.py)
PYSIDE_TEST(qlocale_test.py)
@@ -105,10 +107,12 @@ PYSIDE_TEST(qoperatingsystemversion_test.py)
PYSIDE_TEST(qpoint_test.py)
PYSIDE_TEST(qprocess_test.py)
PYSIDE_TEST(qproperty_decorator.py)
+PYSIDE_TEST(qrandomgenerator_test.py)
PYSIDE_TEST(qrect_test.py)
PYSIDE_TEST(qregularexpression_test.py)
PYSIDE_TEST(qresource_test.py)
PYSIDE_TEST(qsettings_test.py)
+PYSIDE_TEST(qsharedmemory_test.py)
PYSIDE_TEST(qsize_test.py)
PYSIDE_TEST(qslot_object_test.py)
PYSIDE_TEST(qsocketnotifier_test.py)
diff --git a/sources/pyside6/tests/QtCore/qiodevice_buffered_read_test.py b/sources/pyside6/tests/QtCore/qiodevice_buffered_read_test.py
index a20e41be8..257262a4b 100644
--- a/sources/pyside6/tests/QtCore/qiodevice_buffered_read_test.py
+++ b/sources/pyside6/tests/QtCore/qiodevice_buffered_read_test.py
@@ -4,11 +4,18 @@ from __future__ import annotations
'''Test cases for buffered read methods of QIODevice'''
-from PySide6.QtCore import QBuffer
-
import enum
+import os
+import sys
import unittest
+from pathlib import Path
+sys.path.append(os.fspath(Path(__file__).resolve().parents[1]))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QBuffer
+
class TestQIODeviceBufferedRead(unittest.TestCase):
class TestType(enum.Enum):
diff --git a/sources/pyside6/tests/QtCore/qiopipe_test.py b/sources/pyside6/tests/QtCore/qiopipe_test.py
index 908a3a892..0771e6f3b 100644
--- a/sources/pyside6/tests/QtCore/qiopipe_test.py
+++ b/sources/pyside6/tests/QtCore/qiopipe_test.py
@@ -4,10 +4,18 @@ from __future__ import annotations
'''Test cases for the QIOPipe class'''
-from PySide6.QtCore import QIODevice, QIOPipe
-
+import os
+import sys
import unittest
+from pathlib import Path
+sys.path.append(os.fspath(Path(__file__).resolve().parents[1]))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+
+from PySide6.QtCore import QIODevice, QIOPipe
+
class QIOPipeTest(unittest.TestCase):
def setUp(self) -> None:
diff --git a/sources/pyside6/tests/QtCore/qsharedmemory_client.py b/sources/pyside6/tests/QtCore/qsharedmemory_client.py
index 04d1a6fd5..561342d4e 100644
--- a/sources/pyside6/tests/QtCore/qsharedmemory_client.py
+++ b/sources/pyside6/tests/QtCore/qsharedmemory_client.py
@@ -4,9 +4,16 @@ from __future__ import annotations
'''Client for the unit test of QSharedMemory'''
+import os
import sys
-from PySide6.QtCore import QSharedMemory
+from pathlib import Path
+FILE = Path(__file__).resolve()
+sys.path.append(os.fspath(FILE.parents[1]))
+from init_paths import init_test_paths # noqa: E402
+init_test_paths(False)
+
+from PySide6.QtCore import QSharedMemory # noqa: E402
def read_string(shared_memory):
diff --git a/sources/pyside6/tests/QtGui/CMakeLists.txt b/sources/pyside6/tests/QtGui/CMakeLists.txt
index 71a5c7eb9..b1708e348 100644
--- a/sources/pyside6/tests/QtGui/CMakeLists.txt
+++ b/sources/pyside6/tests/QtGui/CMakeLists.txt
@@ -36,6 +36,7 @@ if(WIN32)
endif()
PYSIDE_TEST(qitemselection_test.py)
PYSIDE_TEST(qpainter_test.py)
+PYSIDE_TEST(qpaintengine_test.py)
PYSIDE_TEST(qpen_test.py)
PYSIDE_TEST(qpdfwriter_test.py)
PYSIDE_TEST(qpixelformat_test.py)
diff --git a/sources/pyside6/tests/QtQml/CMakeLists.txt b/sources/pyside6/tests/QtQml/CMakeLists.txt
index 30bf7e786..e9e1e664d 100644
--- a/sources/pyside6/tests/QtQml/CMakeLists.txt
+++ b/sources/pyside6/tests/QtQml/CMakeLists.txt
@@ -35,3 +35,4 @@ PYSIDE_TEST(javascript_exceptions.py)
PYSIDE_TEST(qqmlincubator_incubateWhile.py)
PYSIDE_TEST(qquickitem_grabToImage.py)
PYSIDE_TEST(signal_arguments.py)
+PYSIDE_TEST(signal_types.py)
diff --git a/sources/pyside6/tests/QtUiTools/CMakeLists.txt b/sources/pyside6/tests/QtUiTools/CMakeLists.txt
index 08c6f1577..6788ea0f9 100644
--- a/sources/pyside6/tests/QtUiTools/CMakeLists.txt
+++ b/sources/pyside6/tests/QtUiTools/CMakeLists.txt
@@ -12,5 +12,6 @@ PYSIDE_TEST(bug_913.py)
PYSIDE_TEST(bug_958.py)
PYSIDE_TEST(bug_965.py)
PYSIDE_TEST(bug_1060.py)
+PYSIDE_TEST(loadUiType_test.py)
PYSIDE_TEST(uiloader_test.py)
PYSIDE_TEST(ui_test.py)
diff --git a/sources/pyside6/tests/QtUiTools/loadUiType_test.py b/sources/pyside6/tests/QtUiTools/loadUiType_test.py
index 3eddbd294..f706650d7 100644
--- a/sources/pyside6/tests/QtUiTools/loadUiType_test.py
+++ b/sources/pyside6/tests/QtUiTools/loadUiType_test.py
@@ -13,11 +13,14 @@ init_test_paths(False)
from helper.usesqapplication import UsesQApplication
+from PySide6.QtCore import QStandardPaths
from PySide6.QtWidgets import QWidget, QFrame, QPushButton
from PySide6.QtUiTools import loadUiType
class loadUiTypeTester(UsesQApplication):
+
+ @unittest.skipUnless(bool(QStandardPaths.findExecutable("pyside6-uic")), "pyside6-uic missing")
def testFunction(self):
filePath = os.path.join(os.path.dirname(__file__), "minimal.ui")
loaded = loadUiType(filePath)
diff --git a/sources/pyside6/tests/pysidetest/CMakeLists.txt b/sources/pyside6/tests/pysidetest/CMakeLists.txt
index 8b4de5d8e..4a7e2e1d1 100644
--- a/sources/pyside6/tests/pysidetest/CMakeLists.txt
+++ b/sources/pyside6/tests/pysidetest/CMakeLists.txt
@@ -156,6 +156,7 @@ PYSIDE_TEST(new_inherited_functions_test.py)
PYSIDE_TEST(notify_id.py)
PYSIDE_TEST(properties_test.py)
PYSIDE_TEST(property_python_test.py)
+PYSIDE_TEST(snake_case_sub.py)
PYSIDE_TEST(snake_case_test.py)
PYSIDE_TEST(true_property_test.py)
PYSIDE_TEST(qapp_like_a_macro_test.py)
diff --git a/sources/pyside6/tests/signals/CMakeLists.txt b/sources/pyside6/tests/signals/CMakeLists.txt
index ff342adc7..dd8f4a016 100644
--- a/sources/pyside6/tests/signals/CMakeLists.txt
+++ b/sources/pyside6/tests/signals/CMakeLists.txt
@@ -1,6 +1,7 @@
# Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+PYSIDE_TEST(anonymous_slot_leak_test.py)
PYSIDE_TEST(args_dont_match_test.py)
PYSIDE_TEST(bug_79.py)
PYSIDE_TEST(bug_189.py)