Skip to content

Commit

Permalink
Fix compatibility with pytest 8
Browse files Browse the repository at this point in the history
`pytest.warns(None)` has been deprecated in pytest 7.0.0
and it's no longer working in pytest 8.

Resolves: psf#6679
  • Loading branch information
frenzymadness committed Apr 11, 2024
1 parent 2a438c2 commit cc23d1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-e .[socks]
pytest>=2.8.0,<=6.2.5
pytest>=2.8.0,<9
pytest-cov
pytest-httpbin==2.0.0
httpbin~=0.10.0
Expand Down
2 changes: 1 addition & 1 deletion tests/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ def test_https_warnings(self, nosan_server):
"SubjectAltNameWarning",
)

with pytest.warns(None) as warning_records:
with pytest.warns() as warning_records:
warnings.simplefilter("always")
requests.get(f"https://localhost:{port}/", verify=ca_bundle)

Expand Down

0 comments on commit cc23d1c

Please sign in to comment.