Skip to content

Commit 4def96a

Browse files
committed
check warning messages
1 parent 28c2d3e commit 4def96a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sklearn/datasets/tests/test_base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,4 +366,10 @@ def test_fetch_remote_raise_warnings_with_invalid_url():
366366
with pytest.warns(UserWarning, match="Retry downloading") as record:
367367
with pytest.raises(HTTPError, match="HTTP Error 404"):
368368
_fetch_remote(invalid_remote_file, n_retries=3, delay=0)
369+
370+
for r in record:
371+
assert (
372+
r.message.args[0]
373+
== f"Retry downloading from url: {invalid_remote_file.url}"
374+
)
369375
assert len(record) == 3

0 commit comments

Comments
 (0)