Skip to content

Commit 7a8b8e6

Browse files
committed
skip if ollama is not running
1 parent 3d5f91c commit 7a8b8e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/packages/autogen-ext/tests/models/test_openai_model_client.py

+2
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,8 @@ async def test_ollama() -> None:
796796
response.raise_for_status()
797797
except httpx.HTTPStatusError as e:
798798
pytest.skip(f"{model} model is not running locally: {e}")
799+
except httpx.ConnectError as e:
800+
pytest.skip(f"Ollama is not running locally: {e}")
799801

800802
model_client = OpenAIChatCompletionClient(
801803
model=model,

0 commit comments

Comments
 (0)