mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-15 01:22:13 +00:00
fix(training): make policy evaluation portable
This commit is contained in:
@@ -55,6 +55,14 @@ class EvaluatePairTests(unittest.TestCase):
|
||||
command = run_process.call_args.args[0]
|
||||
self.assertIn("--eval_team_size=2", command)
|
||||
|
||||
@patch("evaluate.subprocess.run")
|
||||
def test_run_uses_portable_headless_renderer_and_writable_log(self, run_process) -> None:
|
||||
run_process.return_value.stdout = 'EVAL_RESULT {"episodes": 2, "goals_a": 1, "goals_b": 0, "draws": 1}\n'
|
||||
evaluate.run_half("godot", "a", "b", 2, 16, 9)
|
||||
command = run_process.call_args.args[0]
|
||||
for option in ("--display-driver", "headless", "--rendering-method", "gl_compatibility", "--audio-driver", "Dummy", "--log-file"):
|
||||
self.assertIn(option, command)
|
||||
|
||||
@patch("evaluate.run_half")
|
||||
def test_2v2_evaluation_preserves_side_swap_and_team_size(self, run_half) -> None:
|
||||
run_half.side_effect = [
|
||||
|
||||
Reference in New Issue
Block a user