Skip to content

Commit 113774c

Browse files
UN-4020 [FIX] Drop the no-op yield from the Bedrock Mantle test fixture
`_isolated_litellm_env` had nothing to do after the yield -- `monkeypatch` undoes its own `delenv` calls at teardown -- so being a generator bought nothing and read as an empty teardown block. Made it a plain function returning None and dropped the now-unused `Iterator` import. Behaviour is unchanged: a non-generator autouse fixture still runs, verified by breaking its precondition (`LITELLM_LOCAL_MODEL_COST_MAP=False`), which still fails every test in the file on the registry-pin assertion. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 742a705 commit 113774c

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎unstract/sdk1/tests/test_bedrock_mantle_routing.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import json
1616
import os
17-
from collections.abc import Iterator
1817
from typing import Any
1918
from unittest.mock import patch
2019

@@ -57,7 +56,7 @@
5756

5857

5958
@pytest.fixture(autouse=True)
60-
def _isolated_litellm_env(monkeypatch: pytest.MonkeyPatch) -> Iterator[None]:
59+
def _isolated_litellm_env(monkeypatch: pytest.MonkeyPatch) -> None:
6160
"""Strip ambient AWS config and assert the registry pin actually took.
6261
6362
The registry pin itself cannot live here: ``LITELLM_LOCAL_MODEL_COST_MAP``
@@ -73,7 +72,6 @@ def _isolated_litellm_env(monkeypatch: pytest.MonkeyPatch) -> Iterator[None]:
7372
)
7473
for var in _AMBIENT_VARS:
7574
monkeypatch.delenv(var, raising=False)
76-
yield
7775

7876

7977
def _chat_completion_payload() -> dict[str, Any]:

0 commit comments

Comments
 (0)