diff options
author | Simo Fält <simo.falt@qt.io> | 2022-09-01 08:15:19 +0300 |
---|---|---|
committer | Simo Fält <simo.falt@qt.io> | 2022-09-01 08:15:19 +0300 |
commit | 789fc5d65d2e0ba95cda25e63f74dd4def87a775 (patch) | |
tree | 28019fcbb368b64fad68d930a2587ee22092d71b /sources/pyside6/tests/registry/existence_test.py | |
parent | 54a301d83910a760ff7f7aa5bea1e3c3d7226bc8 (diff) | |
parent | 0ad10f40c9cdbe6d054b6e7ffd60d14846a1d4aa (diff) |
Merge remote-tracking branch 'origin/6.3' into wip/6.3_pypy
Change-Id: I049daa7bbac16b4cf680dc60d65553277064b231
Diffstat (limited to 'sources/pyside6/tests/registry/existence_test.py')
-rw-r--r-- | sources/pyside6/tests/registry/existence_test.py | 17 |
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 2ab18152a..fa6cdde34 100644 --- a/sources/pyside6/tests/registry/existence_test.py +++ b/sources/pyside6/tests/registry/existence_test.py @@ -72,8 +72,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, @@ -119,6 +119,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): |