Skip to content

Commit 66eaf7b

Browse files
committed
fix: don't test openai and anthropic if not installed
1 parent 99e41b9 commit 66eaf7b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/test_base_url.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ def test_anthropic_base_url():
4141
def test_default_base_url():
4242
"""Test that agents work without base_url (use default)"""
4343
# This should not raise an error
44-
Agent(model="gpt-4", api_key="test-key")
44+
try:
45+
Agent(model="gpt-4", api_key="test-key")
46+
except ImportError:
47+
pass # Skip if openai not installed
4548

4649
try:
4750
Agent(model="claude-3-5-sonnet-20241022", api_key="test-key")

0 commit comments

Comments
 (0)