Skip to content

Commit 90f4f59

Browse files
committed
Use 'match' instead of 'message' with pytest.raises()
Since the former is actually what we should have been using all along. See: pytest-dev/pytest#3974
1 parent f6dec32 commit 90f4f59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def test_block_unmocked_requests():
1212
"""Ensure the `block_unmocked_requests` fixture prevents requests from hitting the network."""
1313
url = 'https://example.com'
1414

15-
with pytest.raises(RuntimeError, message='Tests must mock all HTTP requests!'):
15+
with pytest.raises(RuntimeError, match='Tests must mock all HTTP requests!'):
1616
fetch_text(url)
1717

1818
with responses.RequestsMock() as rsps:

0 commit comments

Comments
 (0)