8000 did LR raise a warning? · NicolasHug/scikit-learn@93956cb · GitHub
[go: up one dir, main page]

Skip to content

Commit 93956cb

Browse files
committed
did LR raise a warning?
1 parent f7074fb commit 93956cb

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

sklearn/tests/test_gonna_be_removed_dont_worry.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44
import warnings
55

66
import pytest
7-
from sklearn.linear_model import LogisticRegression
7+
from sklearn.experimental import enable_hist_gradient_boosting # noqa
8+
from sklearn.ensemble import HistGradientBoostingClassifier
89
from sklearn.exceptions import SkipTestWarning
910
from sklearn.utils.estimator_checks import check_estimator
1011

1112

1213
def test_strict_mode():
1314

14-
lr = LogisticRegression()
15+
est = HistGradientBoostingClassifier(max_iter=10, min_samples_leaf=1)
1516
with pytest.warns(SkipTestWarning):
1617
# some_strict_check() was skipped
17-
check_estimator(lr, strict_mode=False)
18+
check_estimator(est, strict_mode=False)
1819

1920
with warnings.catch_warnings(record=True) as w:
2021
# some_strict_check() was ran
21-
check_estimator(lr, strict_mode=True)
22-
assert not w
22+
check_estimator(est, strict_mode=True)
23+
assert not w

sklearn/utils/estimator_checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2989,7 +2989,7 @@ def wrapper(*args, **kwargs):
29892989
return check(*args, **kwargs)
29902990
else:
29912991
raise SkipTest(
2992-
f"strict mode is on and {check} is marked as strict"
2992+
f"strict mode is off and {check} is marked as strict"
29932993
)
29942994
return wrapper
29952995

0 commit comments

Comments
 (0)
0