Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit caa7871

Browse files
fbchowsalliewalecka
andcommitted
Remove tests for each classifier
Co-authored-by: Sallie Walecka <[email protected]> (cherry picked from commit e6bced8)
1 parent b39630e commit caa7871

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

sklearn/tests/test_dummy.py

-17
Original file line numberDiff line numberDiff line change
@@ -580,23 +580,6 @@ def test_sample_weight_invalid():
580580
clf = DummyClassifier().fit(X, y, sample_weight)
581581
assert_array_almost_equal(clf.class_prior_, [0.2 / 1.2, 1. / 1.2])
582582

583-
sample_weight = np.random.rand(3, 1)
584-
with pytest.raises(ValueError):
585-
clf.fit(X, y, sample_weight=sample_weight)
586-
587-
sample_weight = np.array(0)
588-
expected_err = r"Singleton.* cannot be considered a valid collection"
589-
with pytest.raises(TypeError, match=expected_err):
590-
clf.fit(X, y, sample_weight=sample_weight)
591-
592-
sample_weight = np.ones(4)
593-
with pytest.raises(ValueError):
594-
clf.fit(X, y, sample_weight=sample_weight)
595-
596-
sample_weight = np.ones(2)
597-
with pytest.raises(ValueError):
598-
clf.fit(X, y, sample_weight=sample_weight)
599-
600583

601584
def test_constant_strategy_sparse_target():
602585
X = [[0]] * 5 # ignored

0 commit comments

Comments
 (0)