We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0e26ed commit d583456Copy full SHA for d583456
skltemplate/utils/tests/test_discovery.py
@@ -1,13 +1,25 @@
1
# Authors: scikit-learn-contrib developers
2
# License: BSD 3 clause
3
4
+import pytest
5
+
6
from skltemplate.utils.discovery import all_displays, all_estimators, all_functions
7
8
9
def test_all_estimators():
10
estimators = all_estimators()
11
assert len(estimators) == 3
12
13
+ estimators = all_estimators(type_filter="classifier")
14
+ assert len(estimators) == 1
15
16
+ estimators = all_estimators(type_filter=["classifier", "transformer"])
17
+ assert len(estimators) == 2
18
19
+ err_msg = "Parameter type_filter must be"
20
+ with pytest.raises(ValueError, match=err_msg):
21
+ all_estimators(type_filter="xxxx")
22
23
24
def test_all_displays():
25
displays = all_displays()
0 commit comments