@pytest.mark.parametrize('scores, n_iter_no_change, tol, stopping', [([], 1, 0.001, False), ([1, 1, 1], 5, 0.001, False), ([1, 1, 1, 1, 1], 5, 0.001, False), ([1, 2, 3, 4, 5, 6], 5, 0.001, False), ([1, 2, 3, 4, 5, 6], 5, 0.0, False), ([1, 2, 3, 4, 5, 6], 5, 0.999, False), ([1, 2, 3, 4, 5, 6], 5, (5 - 1e-05), False), (([1] * 6), 5, 0.0, True), (([1] * 6), 5, 0.001, True), (([1] * 6), 5, 5, True)])
def test_should_stop(scores, n_iter_no_change, tol, stopping):
    gbdt = HistGradientBoostingClassifier(n_iter_no_change=n_iter_no_change, tol=tol)
    assert (gbdt._should_stop(scores) == stopping)
@pytest.mark.parametrize('scores, n_iter_no_change, tol, stopping', [([], 1, 0.001, False), ([1, 1, 1], 5, 0.001, False), ([1, 1, 1, 1, 1], 5, 0.001, False), ([1, 2, 3, 4, 5, 6], 5, 0.001, False), ([1, 2, 3, 4, 5, 6], 5, 0.0, False), ([1, 2, 3, 4, 5, 6], 5, 0.999, False), ([1, 2, 3, 4, 5, 6], 5, (5 - 1e-05), False), (([1] * 6), 5, 0.0, True), (([1] * 6), 5, 0.001, True), (([1] * 6), 5, 5, True)])
def test_should_stop(scores, n_iter_no_change, tol, stopping):
    gbdt = HistGradientBoostingClassifier(n_iter_no_change=n_iter_no_change, tol=tol)
    assert (gbdt._should_stop(scores) == stopping)