Skip to content

Commit 8baeff6

Browse files
committed
ruff: add noqa for pytest.raises
1 parent 650dc6b commit 8baeff6

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

tests/test_handler_errors.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def handler(_) -> werkzeug.Response:
2929

3030
httpserver.check_assertions()
3131

32-
with pytest.raises(ValueError):
32+
with pytest.raises(ValueError): # noqa: PT011
3333
httpserver.check_handler_errors()
3434

3535

@@ -48,10 +48,10 @@ def handler2(_) -> werkzeug.Response:
4848

4949
httpserver.check_assertions()
5050

51-
with pytest.raises(ValueError):
51+
with pytest.raises(ValueError): # noqa: PT011
5252
httpserver.check_handler_errors()
5353

54-
with pytest.raises(OSError):
54+
with pytest.raises(OSError): # noqa: PT011
5555
httpserver.check_handler_errors()
5656

5757
httpserver.check_handler_errors()
@@ -88,5 +88,5 @@ def handler3(_):
8888
with pytest.raises(AssertionError):
8989
httpserver.check()
9090

91-
with pytest.raises(ValueError):
91+
with pytest.raises(ValueError): # noqa: PT011
9292
httpserver.check()

tests/test_json_matcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ def test_json_matcher_with_invalid_json(httpserver: HTTPServer):
3636

3737

3838
def test_data_and_json_mutually_exclusive(httpserver: HTTPServer):
39-
with pytest.raises(ValueError):
39+
with pytest.raises(ValueError): # noqa: PT011
4040
httpserver.expect_request("/foo", json={}, data="foo")

0 commit comments

Comments
 (0)