Spaces:
Sleeping
Sleeping
Commit ·
51dbc62
1
Parent(s): 2bab08f
test(environment): add reset() tests — observation shape, history clear, unique ids
Browse files- tests/test_environment.py +10 -0
tests/test_environment.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import pytest
|
| 2 |
+
from server.environment import RedTeamEnvironment
|
| 3 |
+
|
| 4 |
+
@pytest.mark.asyncio
|
| 5 |
+
async def test_reset():
|
| 6 |
+
env = RedTeamEnvironment()
|
| 7 |
+
obs = await env.reset()
|
| 8 |
+
assert obs.turn == 0
|
| 9 |
+
assert obs.episode_id is not None
|
| 10 |
+
assert env.is_active is True
|