

def test_constants_not_specified_regressor():
    X = ([[0]] * 5)
    y = [1, 2, 4, 6, 8]
    est = DummyRegressor(strategy='constant')
    assert_raises(TypeError, est.fit, X, y)

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/tests/test_dummy.py test_constants_not_specified_regressor/original