pytest setup a github workflow to run tests + more ignores

This commit is contained in:
2025-11-04 19:23:10 +01:00
parent 5b0afea651
commit 6cba6bb329
6 changed files with 59 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import pytest
import asyncio
from experiments.agents.agent import get_agent, AgentTypes
import os
def test_agent_init():
@@ -16,8 +17,10 @@ def test_invalid_agent():
@pytest.mark.asyncio
@pytest.mark.skipif("OPENAI_API_KEY" not in os.environ, reason="OPENAI_API_KEY not set")
async def test_agent_execution():
agent = get_agent(AgentTypes.GENERIC_BROWSER_USE_AGENT, goal="get page title", url="https://example.com", timeout=60)
result = await agent.act()
assert result
assert agent.final_result()