Skip to content

Commit

Permalink
bring back test_agent_config
Browse files Browse the repository at this point in the history
  • Loading branch information
sidnarayanan committed Sep 5, 2024
1 parent a5e38ca commit 8734829
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,3 +631,11 @@ async def test_lifecycle(self, dummy_env: DummyEnv) -> None:
with patch("httpx.AsyncClient.post", async_client.post), eval_mode():
# Check we can make a second sequential Agent decision without crashing
await agent_client.get_asv(agent_state_1, obs)


@pytest.mark.parametrize("agent_cls", [SimpleAgent, MemoryAgent, ReActAgent])
def test_agent_config(agent_cls: type[Agent]):
config = AgentConfig(agent_type=agent_cls.__name__)
assert isinstance(hash(config), int), "AgentConfig should be hashable"
agent = config.construct_agent()
assert isinstance(agent, agent_cls)

0 comments on commit 8734829

Please sign in to comment.