diff options
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): |