File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11{
2- "version": "0.5.5.0a "
2+ "version": "0.5.5.0 "
33}
Original file line number Diff line number Diff line change @@ -247,15 +247,15 @@ def test_serialize_relative_file_path_from_union():
247247 assert data == path_str
248248
249249
250- def test_open_url_with_wrong_sha ():
250+ def test_open_url_with_wrong_sha (respx_mock : MockRouter ):
251251 from bioimageio .spec ._internal .io import (
252252 _open_url , # pyright: ignore[reportPrivateUsage]
253253 )
254254
255255 url = "https://example.com/file.txt"
256256 sha = Sha256 ("0" * 64 ) # invalid sha256 for testing
257257
258- with pytest . raises (
259- httpx . HTTPStatusError , match = f"Client error '404 Not Found' for url ' { url } '"
260- ):
258+ _ = respx_mock . get ( url ). mock ( side_effect = httpx . InvalidURL ( "Invalid URL" ))
259+
260+ with pytest . raises ( httpx . InvalidURL , match = "Invalid URL" ):
261261 _ = _open_url (HttpUrl (url ), sha256 = sha )
You can’t perform that action at this time.
0 commit comments