Skip to content

Commit e26dd57

Browse files
committed
iter
1 parent 9383dee commit e26dd57

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

imblearn/metrics/tests/test_classification.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
from imblearn.metrics import classification_report_imbalanced
3232
from imblearn.metrics import macro_averaged_mean_absolute_error
3333

34-
from imblearn.utils.testing import warns
35-
3634
RND_SEED = 42
3735
R_TOL = 1e-2
3836

@@ -182,7 +180,8 @@ def test_sensitivity_specificity_support_errors():
182180

183181
def test_sensitivity_specificity_unused_pos_label():
184182
# but average != 'binary'; even if data is binary
185-
with warns(UserWarning, r"use labels=\[pos_label\] to specify a single"):
183+
msg = r"use labels=\[pos_label\] to specify a single"
184+
with pytest.warns(UserWarning, match=msg):
186185
sensitivity_specificity_support(
187186
[1, 2, 1], [1, 2, 2], pos_label=2, average="macro"
188187
)

0 commit comments

Comments
 (0)