Skip to content

Commit 9dfe018

Browse files
amuellerjnothman
authored andcommitted
TST do the warning test as we do it in other places. (scikit-learn#7858)
1 parent 07b39af commit 9dfe018

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/feature_selection/tests/test_chi2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def test_chi2_unused_feature():
7777
warnings.simplefilter('always')
7878
chi, p = chi2([[1, 0], [0, 0]], [1, 0])
7979
for w in warned:
80-
if 'divide by zero' in w.message:
80+
if 'divide by zero' in repr(w):
8181
raise AssertionError('Found unexpected warning %s' % w)
8282
assert_array_equal(chi, [1, np.nan])
8383
assert_array_equal(p[1], np.nan)

0 commit comments

Comments
 (0)