Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiedbb committed Oct 23, 2018
1 parent 9c43796 commit 7d3c06e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sklearn/ensemble/tests/test_gradient_boosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ def predict(self, X):
ids=["classification", "regression"])
def test_gradient_boosting_with_init(task):
# Check that GradientBoostingRegressor works when init is a sklearn
# estimator
# estimator.
# Check that an error is raised if trying to fit with sample weight but
# inital estimator does not support sample weight
gb, dataset_maker, init = task
Expand All @@ -1361,5 +1361,6 @@ def test_gradient_boosting_with_init(task):

# init does not support sample weights
init_est = _NoSampleWaightWrapper(init())
gb(init=init_est).fit(X, y) # ok no sample weights
with pytest.raises(ValueError):
gb(init=init_est).fit(X, y, sample_weight=sample_weight)

0 comments on commit 7d3c06e

Please sign in to comment.