From 2e3c4331a3bf379ebacea76abbca1efd22079eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20Kir=C3=A1ly?= Date: Sun, 17 Nov 2024 15:19:14 +0100 Subject: [PATCH] exclude --- skpro/tests/_config.py | 8 +++++++- skpro/tests/test_all_estimators.py | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/skpro/tests/_config.py b/skpro/tests/_config.py index 31c08b3fe..0775ff69f 100644 --- a/skpro/tests/_config.py +++ b/skpro/tests/_config.py @@ -2,4 +2,10 @@ # list of str, names of estimators to exclude from testing # WARNING: tests for these estimators will be skipped -EXCLUDE_ESTIMATORS = ["DummySkipped"] +EXCLUDE_ESTIMATORS = [ + "DummySkipped", + "ClassName", # exclude classes from extension templates +] + + +EXCLUDED_TESTS = {"GLMRegressor": ["test_online_update"]} diff --git a/skpro/tests/test_all_estimators.py b/skpro/tests/test_all_estimators.py index f06263c6c..1874c9166 100644 --- a/skpro/tests/test_all_estimators.py +++ b/skpro/tests/test_all_estimators.py @@ -13,6 +13,7 @@ from skbase.testing.utils.inspect import _get_args from skpro.registry import OBJECT_TAG_LIST, all_objects +from skpro.tests._config import EXCLUDE_ESTIMATORS, EXCLUDED_TESTS from skpro.tests.scenarios.scenarios_getter import retrieve_scenarios from skpro.tests.test_switch import run_test_for_class from skpro.utils.deep_equals import deep_equals @@ -35,7 +36,12 @@ class PackageConfig: # list of object types (class names) to exclude # expected type: list of str, str are class names - exclude_objects = ["ClassName"] # exclude classes from extension templates + exclude_objects = EXCLUDE_ESTIMATORS + + # list of tests to exclude + # expected type: dict of lists, key:str, value: List[str] + # keys are class names of estimators, values are lists of test names to exclude + excluded_tests = EXCLUDED_TESTS # list of valid tags # expected type: list of str, str are tag names