Skip to content

Commit 78876d6

Browse files
authored
[ENH] set up exclude list for estimators (#496)
This PR sets up an exclude list for estimators in `skpro`. Similar to `sktime`, excluded tests or estimators can now be specified in `skpro.tests._config`. Also adds a skip for #497.
1 parent afe5a24 commit 78876d6

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

skpro/tests/_config.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22

33
# list of str, names of estimators to exclude from testing
44
# WARNING: tests for these estimators will be skipped
5-
EXCLUDE_ESTIMATORS = ["DummySkipped"]
5+
EXCLUDE_ESTIMATORS = [
6+
"DummySkipped",
7+
"ClassName", # exclude classes from extension templates
8+
]
9+
10+
11+
EXCLUDED_TESTS = {"GLMRegressor": ["test_online_update"]}

skpro/tests/test_all_estimators.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from skbase.testing.utils.inspect import _get_args
1414

1515
from skpro.registry import OBJECT_TAG_LIST, all_objects
16+
from skpro.tests._config import EXCLUDE_ESTIMATORS, EXCLUDED_TESTS
1617
from skpro.tests.scenarios.scenarios_getter import retrieve_scenarios
1718
from skpro.tests.test_switch import run_test_for_class
1819
from skpro.utils.deep_equals import deep_equals
@@ -35,7 +36,12 @@ class PackageConfig:
3536

3637
# list of object types (class names) to exclude
3738
# expected type: list of str, str are class names
38-
exclude_objects = ["ClassName"] # exclude classes from extension templates
39+
exclude_objects = EXCLUDE_ESTIMATORS
40+
41+
# list of tests to exclude
42+
# expected type: dict of lists, key:str, value: List[str]
43+
# keys are class names of estimators, values are lists of test names to exclude
44+
excluded_tests = EXCLUDED_TESTS
3945

4046
# list of valid tags
4147
# expected type: list of str, str are tag names

0 commit comments

Comments
 (0)