(
selenium_coverage: typing.Any, testserver_http: PyodideServerInfo
)
| 177 | |
| 178 | # no connection - should raise |
| 179 | def test_no_response( |
| 180 | selenium_coverage: typing.Any, testserver_http: PyodideServerInfo |
| 181 | ) -> None: |
| 182 | @run_in_pyodide # type: ignore[untyped-decorator] |
| 183 | def pyodide_test(selenium_coverage, host: str, port: int) -> None: # type: ignore[no-untyped-def] |
| 184 | import http.client |
| 185 | |
| 186 | import pytest |
| 187 | |
| 188 | from urllib3.connection import HTTPConnection |
| 189 | |
| 190 | conn = HTTPConnection(host, port) |
| 191 | with pytest.raises(http.client.HTTPException): |
| 192 | conn.request("GET", f"http://{host}:{port}/") |
| 193 | _ = conn.getresponse() |
| 194 | |
| 195 | pyodide_test(selenium_coverage, testserver_http.http_host, find_unused_port()) |
| 196 | |
| 197 | |
| 198 | def test_404(selenium_coverage: typing.Any, testserver_http: PyodideServerInfo) -> None: |
nothing calls this directly
no test coverage detected