Skip to content

Commit

Permalink
test: add tests for agent_factory
Browse files Browse the repository at this point in the history
  • Loading branch information
JonBergland committed Apr 8, 2024
1 parent 42b3f62 commit 1e1a47a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/agents/test_agent_factory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from src.agents.agent_factory import create_agent
from src.agents.randomAgent import RandomAgent

def test_create_agent_random():
agent = create_agent('random')
assert isinstance(agent, RandomAgent)

def test_create_agent_unknown():
try:
create_agent('unknown')
assert False, "Expected ValueError"
except ValueError as e:
assert str(e) == "Unknown agent type: unknown"

0 comments on commit 1e1a47a

Please sign in to comment.