Skip to content

Commit

Permalink
Make pre-commit happy
Browse files Browse the repository at this point in the history
  • Loading branch information
stanmart committed Jan 23, 2024
1 parent 39ce302 commit 099f362
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/glm/test_glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3210,7 +3210,9 @@ def test_cat_missing(cat_missing_method, unseen_missing, formula):
fit_intercept=False,
)
if cat_missing_method == "fail" and not unseen_missing:
with pytest.raises(ValueError, match="Categorical data can't have missing values"):
with pytest.raises(
ValueError, match="Categorical data can't have missing values"
):
model.fit(X, y)
else:
model.fit(X, y)
Expand All @@ -3224,7 +3226,9 @@ def test_cat_missing(cat_missing_method, unseen_missing, formula):
assert len(model.coef_) == len(feature_names)

if cat_missing_method == "fail" and unseen_missing:
with pytest.raises(ValueError, match="Categorical data can't have missing values"):
with pytest.raises(
ValueError, match="Categorical data can't have missing values"
):
model.predict(X_unseen)
elif cat_missing_method == "convert" and unseen_missing:
with pytest.raises(ValueError, match="contains unseen categories"):
Expand Down

0 comments on commit 099f362

Please sign in to comment.