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

Method test_valid_agent

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

mock_player_factoryFunction · 0.85
validate_codeMethod · 0.45

Tested by

no test coverage detected