AgentnessBench / tests /agents /test_agent_base.py
irregular6612's picture
refactor: restructure proteus into game/web subpackages
426093b
Raw
History Blame Contribute Delete
408 Bytes
import pytest
from proteus.game.agents.base import Agent, ActResult
def test_actresult_fields():
r = ActResult(action="up", reasoning="predator behind", raw_text="ACTION: up")
assert r.action == "up"
assert r.reasoning == "predator behind"
assert r.raw_text == "ACTION: up"
def test_agent_is_abstract():
with pytest.raises(TypeError):
Agent() # abstract: cannot instantiate