diff options
Diffstat (limited to 'sources/pyside2/tests')
-rw-r--r-- | sources/pyside2/tests/CMakeLists.txt | 1 | ||||
-rw-r--r-- | sources/pyside2/tests/QtWidgets/qlabel_test.py | 9 | ||||
-rw-r--r-- | sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py | 9 | ||||
-rw-r--r-- | sources/pyside2/tests/registry/existence_test.py | 2 | ||||
-rw-r--r-- | sources/pyside2/tests/registry/init_platform.py | 1 | ||||
-rw-r--r-- | sources/pyside2/tests/support/voidptr_test.py | 4 |
6 files changed, 6 insertions, 20 deletions
diff --git a/sources/pyside2/tests/CMakeLists.txt b/sources/pyside2/tests/CMakeLists.txt index 2386950e9..4289012a8 100644 --- a/sources/pyside2/tests/CMakeLists.txt +++ b/sources/pyside2/tests/CMakeLists.txt @@ -54,6 +54,7 @@ else() endif() add_subdirectory(registry) add_subdirectory(signals) + add_subdirectory(support) foreach(shortname IN LISTS all_module_shortnames) message(STATUS "preparing tests for module 'Qt${shortname}'") diff --git a/sources/pyside2/tests/QtWidgets/qlabel_test.py b/sources/pyside2/tests/QtWidgets/qlabel_test.py index 2c5616001..9d84b5c17 100644 --- a/sources/pyside2/tests/QtWidgets/qlabel_test.py +++ b/sources/pyside2/tests/QtWidgets/qlabel_test.py @@ -32,14 +32,7 @@ import unittest from PySide2.QtGui import QPixmap from PySide2.QtWidgets import QLabel -try: - # The normal import statement when PySide2 is installed. - from PySide2 import shiboken2 as shiboken -except ImportError: - # When running make test in shiboken build dir, or when running - # testrunner.py, shiboken2 is not part of the PySide2 module, - # so it needs to be imported as a standalone module. - import shiboken2 as shiboken +import shiboken2 as shiboken from helper import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py b/sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py index 7a34cf238..c07bd8705 100644 --- a/sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py +++ b/sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py @@ -31,14 +31,7 @@ import sys from PySide2.QtGui import QStandardItemModel, QStandardItem from PySide2.QtWidgets import QWidget -try: - # The normal import statement when PySide2 is installed. - from PySide2 import shiboken2 as shiboken -except ImportError: - # When running make test in shiboken build dir, or when running testrunner.py, - # shiboken2 is not part of the PySide2 module, so it needs to be imported as a standalone - # module. - import shiboken2 as shiboken +import shiboken2 as shiboken from helper import UsesQApplication diff --git a/sources/pyside2/tests/registry/existence_test.py b/sources/pyside2/tests/registry/existence_test.py index 6e870385d..0d8014ad8 100644 --- a/sources/pyside2/tests/registry/existence_test.py +++ b/sources/pyside2/tests/registry/existence_test.py @@ -130,7 +130,7 @@ class TestSignaturesExists(unittest.TestCase): warn(msgMultiSignatureCount(key, found_sigs[key], value)) self.assertTrue(check_warnings()) -tested_versions = (5, 6), (5, 9), (5, 11) +tested_versions = (5, 6), (5, 9), (5, 11) #, (5, 12) # activate this, soon! if not have_refmodule and is_ci and qtVersion()[:2] in tested_versions: class TestFor_CI_Init(unittest.TestCase): diff --git a/sources/pyside2/tests/registry/init_platform.py b/sources/pyside2/tests/registry/init_platform.py index 66ec6f566..ded8ba81c 100644 --- a/sources/pyside2/tests/registry/init_platform.py +++ b/sources/pyside2/tests/registry/init_platform.py @@ -56,7 +56,6 @@ from textwrap import dedent all_modules = list("PySide2." + x for x in PySide2.__all__) from PySide2.QtCore import __version__ - from PySide2.support.signature.lib.enum_sig import SimplifyingEnumerator is_py3 = sys.version_info[0] == 3 diff --git a/sources/pyside2/tests/support/voidptr_test.py b/sources/pyside2/tests/support/voidptr_test.py index 8179407e5..330788c63 100644 --- a/sources/pyside2/tests/support/voidptr_test.py +++ b/sources/pyside2/tests/support/voidptr_test.py @@ -27,7 +27,7 @@ ############################################################################# import unittest -from PySide2 import shiboken2 +import shiboken2 as shiboken from PySide2.support import VoidPtr from PySide2.QtCore import QByteArray @@ -40,7 +40,7 @@ class PySide2Support(unittest.TestCase): # or another VoidPtr object. ba = QByteArray(b"Hello world") voidptr = VoidPtr(ba) - self.assertIsInstance(voidptr, shiboken2.VoidPtr) + self.assertIsInstance(voidptr, shiboken.VoidPtr) if __name__ == '__main__': unittest.main() |