10000 test for ValueError · paulgb/scikit-learn@d7593fc · GitHub
[go: up one dir, main page]

Skip to content

Commit d7593fc

Browse files
committed
test for ValueError
1 parent 85ab4dd commit d7593fc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sklearn/tests/test_pipeline.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ def test_pipeline_init():
8282
filter1 = SelectKBest(f_classif)
8383
pipe = Pipeline([('anova', filter1), ('svc', clf)])
8484

85+
# Check that we can't use the same stage name twice
86+
assert_raises(ValueError, Pipeline, [('svc', SVC()), ('svc', SVC())])
87+
8588
# Check that params are set
8689
pipe.set_params(svc__C=0.1)
8790
assert_equal(clf.C, 0.1)

0 commit comments

Comments
 (0)
0