Skip to content

Commit

Permalink
Add carve out for Monty deprecation warning
Browse files Browse the repository at this point in the history
Update pyproject.toml

Update pyproject.toml

Fix deprecation warning
  • Loading branch information
ml-evs committed Jan 3, 2025
1 parent d76bc1a commit b833036
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,5 @@ filterwarnings = [
"ignore:.*The 'app' shortcut is now deprecated.*:DeprecationWarning", # Raised by httpx for test client code; would rather not force upgrade of httpx to deal with it for now
"ignore::pytest.PytestUnraisableExceptionWarning", # Started raising with pytest 8.2.1, seemingly related to anyio warnings
"ignore:.*Unclosed.*:ResourceWarning", # Also started raising with pytest 8.2.1, seemingly related to anyio warnings
"ignore:.*This function should have been removed on 2025-01-01*:DeprecationWarning", # Raised by monty, who knows when it will actually be removed
]
7 changes: 7 additions & 0 deletions tests/adapters/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
import requests


@pytest.fixture(autouse=True)
def set_ci_env(monkeypatch):
"""Super unpleasant workaround to deal with monty's deprecation behaviour."""
monkeypatch.setenv("CI", "false")
yield


@pytest.fixture
def mock_requests_get(monkeypatch):
"""Patch requests.get to return the desired mock response."""
Expand Down

0 comments on commit b833036

Please sign in to comment.