aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/registry/existence_test.py
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2022-08-08 15:31:15 +0200
committerChristian Tismer <tismer@stackless.com>2022-08-17 09:46:17 +0200
commitbd3e8afdb06c8614164e4ed1f195a8618c1d586d (patch)
tree8e7ab3249c0d6377982dcf84417876b592105845 /sources/pyside6/tests/registry/existence_test.py
parent50b0ccb4d17ccd7befc54dc51baec0ee5425da0a (diff)
signature: Update, cleanup and install signature test
The signature tests were disabled for a long time. Meanwhile, a number of unresolved values have piled up. The reason was partially a weird mixture of intents that made it unpractical to run the full tests on every platform. Mamely, macOS was quite unclear about which signatures have to exist and which don't. This overhaul does the following: * The various Shiboken modules were removed from the tested signatures * A pure test is added that only checks for no offending lines As effect, signatures are tested unconditionally without any other conditions. The other tests remain disabled. Task-number: PYSIDE-510 Change-Id: Id9e65ed7324a795966f460e13dd95fd5cebcca6a Pick-to: 6.3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/tests/registry/existence_test.py')
-rw-r--r--sources/pyside6/tests/registry/existence_test.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/sources/pyside6/tests/registry/existence_test.py b/sources/pyside6/tests/registry/existence_test.py
index 15476caa5..5540b6e04 100644
--- a/sources/pyside6/tests/registry/existence_test.py
+++ b/sources/pyside6/tests/registry/existence_test.py
@@ -36,8 +36,8 @@ import unittest
from pathlib import Path
sys.path.append(os.fspath(Path(__file__).resolve().parents[1]))
-from init_paths import init_all_test_paths
-init_all_test_paths()
+from init_paths import init_test_paths
+init_test_paths(True)
from init_platform import enum_all, generate_all
from util import (isolate_warnings, check_warnings, suppress_warnings, warn,
@@ -83,6 +83,19 @@ if have_refmodule and not hasattr(sig_exists, dict_name):
have_refmodule = False
+class TestUnrecognizedOffending(unittest.TestCase):
+ """
+ We run the signature generation on all modules and raise an error
+ if a warning was issued. This is better than turning warnings into
+ errors because that would stop early before we have all warnings.
+ """
+ def test_signatures_recognized(self):
+ with isolate_warnings():
+ found_sigs = enum_all()
+ if check_warnings():
+ raise RuntimeError("There are errors, see above.")
+
+
@unittest.skipIf(not have_refmodule,
"not activated for this platform or version")
class TestSignaturesExists(unittest.TestCase):