Skip to content

Commit 47eae84

Browse files
committed
MockClassifier has been added to the _grid_search tests.
1 parent 401d2a1 commit 47eae84

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

sklearn/model_selection/tests/test_search.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,21 +166,19 @@ def test_grid_search():
166166

167167

168168
def test_grid_search_incorrect_param_grid():
169+
clf = MockClassifier()
169170
assert_raise_message(
170171
ValueError,
171172
"Parameter values for parameter (C) need to be a sequence.",
172-
GridSearchCV,
173-
None,
174-
{'C': 1})
173+
GridSearchCV, clf, {'C': 1})
175174

176175

177176
def test_grid_search_param_grid_includes_sequence_of_a_zero_length():
177+
clf = MockClassifier()
178178
assert_raise_message(
179179
ValueError,
180180
"Parameter values for parameter (C) need to be a non-empty sequence.",
181-
GridSearchCV,
182-
None,
183-
{'C': []})
181+
GridSearchCV, clf, {'C': []})
184182

185183

186184
@ignore_warnings

0 commit comments

Comments
 (0)