-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_round.py
More file actions
26 lines (22 loc) · 765 Bytes
/
test_round.py
File metadata and controls
26 lines (22 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import asyncio
import os
import structlog
from orchestrator.main import Orchestrator
# Configure logging to show in terminal
structlog.configure(
processors=[structlog.dev.ConsoleRenderer()],
)
async def test_round():
orch = Orchestrator()
await orch.initialize_agents()
print("\nStarting Test Round...")
results = await orch.run_round()
print("\nRound Results:")
for r in results:
status = "SUCCESS" if r.get("success") else f"FAILED: {r.get('error')}"
print(f" - {r['agent_id']}: {status}")
if r.get("infections_sent"):
for i in r["infections_sent"]:
print(f" -> Infection to {i['target']} (Accepted: {i['accepted']})")
if __name__ == "__main__":
asyncio.run(test_round())