Skip to content
Snippets Groups Projects
Commit 626e537e authored by Andreas Mueller's avatar Andreas Mueller
Browse files

do the warning test as we do it in other places.

parent 66fbfae0
Branches
No related tags found
No related merge requests found
......@@ -77,7 +77,7 @@ def test_chi2_unused_feature():
warnings.simplefilter('always')
chi, p = chi2([[1, 0], [0, 0]], [1, 0])
for w in warned:
if 'divide by zero' in w.message:
if 'divide by zero' in repr(w):
raise AssertionError('Found unexpected warning %s' % w)
assert_array_equal(chi, [1, np.nan])
assert_array_equal(p[1], np.nan)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment