mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-17 15:35:21 +02:00
add tests/roles/
This commit is contained in:
parent
c7273f1b3e
commit
a56777edb9
2 changed files with 19 additions and 0 deletions
3
examples/st_game/tests/roles/__init__.py
Normal file
3
examples/st_game/tests/roles/__init__.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Desc :
|
||||
16
examples/st_game/tests/roles/test_st_role.py
Normal file
16
examples/st_game/tests/roles/test_st_role.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from examples.st_game.roles.st_role import STRole, STRoleContext
|
||||
from examples.st_game.memory.agent_memory import BasicMemory
|
||||
|
||||
role = STRole(start_date="October 4, 2023", curr_time="October 4, 2023, 00:00:00",
|
||||
sim_code="base_the_ville_isabella_maria_klaus")
|
||||
|
||||
def test_role_init():
|
||||
assert role.role_tile == (126, 46)
|
||||
assert role._rc.env.maze.maze_height == 100
|
||||
assert role._rc.env.maze.maze_width == 140
|
||||
|
||||
def test_observe():
|
||||
ret_events = role.observe()
|
||||
assert ret_events
|
||||
for event in ret_events:
|
||||
assert isinstance(event, BasicMemory)
|
||||
Loading…
Add table
Add a link
Reference in a new issue