Skip to content

Commit 376462d

Browse files
committed
Adding test for incorrect score threshold type
1 parent b8118c0 commit 376462d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_greedy_selector.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ def test_score_threshold_and_full(self):
4949
"You cannot specify both `score_threshold` and `full=True`.",
5050
)
5151

52+
def test_bad_score_threshold_type(self):
53+
with self.assertRaises(ValueError) as cm:
54+
_ = GreedyTester(score_threshold_type = "invalid").fit(self.X)
55+
self.assertEqual(
56+
str(cm.exception),
57+
"invalid score_threshold_type, expected one of 'relative' or 'absolute'"
58+
)
59+
5260
def test_bad_warm_start(self):
5361
selector = GreedyTester()
5462
with self.assertRaises(ValueError) as cm:

0 commit comments

Comments
 (0)