From 4e63ba07d8d9104330a995dc77ea2de9098bccde Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Mon, 25 Apr 2022 15:52:43 +0200 Subject: __feature__: improve the feature module by a reset function The __feature__ tests need a stronger way to reset the feature selection reliably. Some cross-talk was observed when running multiple tests together with PyTest. This effect was hidden because our unit-tests are isolated in individual processes by CTest. - Remove all special 0x80 cases of TearDown functions - introduce a new feature module function `reset` that completely uninitializes the features, including the `pyside_feature_dict`. - drop the artificial naming of `__feature__` in favor of `feature`. This is less confusing for people examining the implementation. [ChangeLog][PySide6] Feature switching was improved by avoiding cross-talk between multiple test runs. Task-number: PYSIDE-1019 Change-Id: I28550f293763ac58df72b8ce5c0a613c2067f6ba Pick-to: 6.3 Reviewed-by: Friedemann Kleint Reviewed-by: Cristian Maureira-Fredes Reviewed-by: Qt CI Bot --- sources/pyside6/PySide6/support/generate_pyi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sources/pyside6/PySide6/support/generate_pyi.py') diff --git a/sources/pyside6/PySide6/support/generate_pyi.py b/sources/pyside6/PySide6/support/generate_pyi.py index b5691f190..0c3bc2462 100644 --- a/sources/pyside6/PySide6/support/generate_pyi.py +++ b/sources/pyside6/PySide6/support/generate_pyi.py @@ -96,7 +96,7 @@ def generate_all_pyi(outpath, options): # PYSIDE-535: We cannot use __feature__ yet in PyPy generate_pyi(import_name, outpath, options) else: - import __feature__ as feature + from PySide6.support import feature feature_id = feature.get_select_id(options.feature) with feature.force_selection(feature_id, import_name): generate_pyi(import_name, outpath, options) -- cgit v1.2.3