TST: add a regression test for issue 11872
This commit is contained in:
parent
cb57bf50b1
commit
797c8be4ca
|
@ -1450,3 +1450,11 @@ def test_issue_9765(pytester: Pytester) -> None:
|
||||||
raise AssertionError(
|
raise AssertionError(
|
||||||
f"pytest command failed:\n{exc.stdout=!s}\n{exc.stderr=!s}"
|
f"pytest command failed:\n{exc.stdout=!s}\n{exc.stderr=!s}"
|
||||||
) from exc
|
) from exc
|
||||||
|
|
||||||
|
|
||||||
|
def test_issue_11872():
|
||||||
|
# see https://github.com/pytest-dev/pytest/issues/11872
|
||||||
|
from urllib.error import HTTPError
|
||||||
|
|
||||||
|
with pytest.raises(HTTPError, match="Not Found"):
|
||||||
|
raise HTTPError(code=404, msg="Not Found", fp=None, hdrs=None, url="") # type: ignore [arg-type]
|
||||||
|
|
Loading…
Reference in New Issue