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

Method test_missing_decide

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

Source from the content-addressed store, hash-verified

30 assert error is None
31
32 def test_missing_decide(self, mock_player_factory):
33 arena = SCMLOneShotArena.__new__(SCMLOneShotArena)
34 arena.submission = "scml_agent.py"
35 player = mock_player_factory(
36 name="Alice",
37 files={"scml_agent.py": "class OtherAgent:\n pass\n"},
38 command_outputs={
39 "test -f scml_agent.py && echo exists": {"output": "exists\n", "returncode": 0},
40 "cat scml_agent.py": {"output": "class OtherAgent:\n pass\n", "returncode": 0},
41 "python -m py_compile scml_agent.py": {"output": "", "returncode": 0},
42 "python - <<'PY'": {"output": "decide function not found", "returncode": 1},
43 },
44 )
45
46 valid, error = arena.validate_code(player)
47
48 assert valid is False
49 assert "Could not import" in error
50
51 def test_import_failure(self, mock_player_factory):
52 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