MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / test_valid_agent

Method test_valid_agent

tests/arenas/test_cyborg.py:13–33  ·  view source on GitHub ↗
(self, mock_player_factory)

Source from the content-addressed store, hash-verified

11
12class TestCybORGValidation:
13 def test_valid_agent(self, mock_player_factory):
14 arena = CybORGArena.__new__(CybORGArena)
15 arena.submission = "cyborg_agent.py"
16 player = mock_player_factory(
17 name="Alice",
18 files={"cyborg_agent.py": "def decide(observation, action_space):\n return 0\n"},
19 command_outputs={
20 "test -f cyborg_agent.py && echo exists": {"output": "exists\n", "returncode": 0},
21 "cat cyborg_agent.py": {
22 "output": "def decide(observation, action_space):\n return 0\n",
23 "returncode": 0,
24 },
25 "python -m py_compile cyborg_agent.py": {"output": "", "returncode": 0},
26 "python - <<'PY'": {"output": "", "returncode": 0},
27 },
28 )
29
30 valid, error = arena.validate_code(player)
31
32 assert valid is True
33 assert error is None
34
35 def test_missing_decide(self, mock_player_factory):
36 arena = CybORGArena.__new__(CybORGArena)

Callers

nothing calls this directly

Calls 2

mock_player_factoryFunction · 0.85
validate_codeMethod · 0.45

Tested by

no test coverage detected