diff --git a/pyproject.toml b/pyproject.toml index 43e35adba..b8a7e3ba2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 ] diff --git a/tests/adapters/conftest.py b/tests/adapters/conftest.py index dd304075b..48a3594cc 100644 --- a/tests/adapters/conftest.py +++ b/tests/adapters/conftest.py @@ -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."""