Skip to content

Commit c7dfa4e

Browse files
committed
Add tests.
1 parent e6635a0 commit c7dfa4e

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

tests/test_compat.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""
2+
test that function in compati behave the same
3+
4+
"""
5+
6+
import pytest
7+
8+
from micropip._compat import HttpStatusError, fetch_string_and_headers
9+
10+
11+
@pytest.mark.asyncio
12+
async def test_404_raise(httpserver):
13+
httpserver.expect_request("/404").respond_with_data(
14+
"Not found", status=404, content_type="text/plain"
15+
)
16+
with pytest.raises(HttpStatusError):
17+
await fetch_string_and_headers(httpserver.url_for("/404"), {})

0 commit comments

Comments
 (0)