File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44"""
55
6- import pytest
76from pytest_pyodide import run_in_pyodide
87
9- from micropip ._compat import HttpStatusError , fetch_string_and_headers
108
9+ def test_404 (selenium_standalone_micropip , httpserver ):
10+ @run_in_pyodide
11+ async def _inner_test_404_raise (selenium , url ):
12+ import pytest
13+
14+ from micropip ._compat import HttpStatusError , fetch_string_and_headers
15+
16+ with pytest .raises (HttpStatusError ):
17+ await fetch_string_and_headers (url , {})
1118
12- @pytest .mark .asyncio
13- @run_in_pyodide
14- async def test_404_raise (httpserver ):
1519 httpserver .expect_request ("/404" ).respond_with_data (
1620 "Not found" , status = 404 , content_type = "text/plain"
1721 )
18- with pytest . raises ( HttpStatusError ):
19- await fetch_string_and_headers ( httpserver . url_for ( "/404" ), {} )
22+ url_404 = httpserver . url_for ( "/404" )
23+ _inner_test_404_raise ( selenium_standalone_micropip , url_404 )
You can’t perform that action at this time.
0 commit comments