Skip to content

Commit

Permalink
and fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Sep 18, 2024
1 parent c1ebbdc commit 97bd851
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions tests/test_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,15 @@ async def _inner_test_404_raise(selenium, url):
import pytest
from packaging.version import parse

from micropip._compat import HttpStatusError
from micropip._compat import HttpStatusError, fetch_string_and_headers

if parse(pyodide.__version__) > parse("0.27"):
ExpectedErrorClass = HttpStatusError
else:
ExpectedErrorClass = OSError

print(
ExpectedErrorClass,
pyodide,
pytest,
parse,
HttpStatusError,
"for precommit to not remove those",
)
with pytest.raises(ExpectedErrorClass):
# # TODO: DEBUG
raise ExpectedErrorClass("message")
# # await fetch_string_and_headers(url, {})
await fetch_string_and_headers(url, {})

httpserver.expect_request("/404").respond_with_data(
"Not found",
Expand Down

0 comments on commit 97bd851

Please sign in to comment.