From 53b6ffdff1536a9437fcc2ad10d20658597e501c Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 27 Sep 2026 22:49:43 +0200 Subject: [PATCH] Name the test class ProjectName and the argv helper model_args --- bin/loop-claude | 8 ++++---- bin/test_loop_claude.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/loop-claude b/bin/loop-claude index 0ca0f78e..21021d5f 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -242,7 +242,7 @@ def replace_json(path, data, **dump): return None -def model_flags(variable, chosen): +def model_args(variable, chosen): return ["--model", os.environ.get(variable) or chosen] @@ -456,7 +456,7 @@ def worker_args(task, name, session_id, chosen, resuming): "--output-format", "stream-json", "--permission-mode", "bypassPermissions", "--verbose", - *model_flags("LOOP_CLAUDE_WORKER_MODEL", chosen), + *model_args("LOOP_CLAUDE_WORKER_MODEL", chosen), ] @@ -488,7 +488,7 @@ def judge(root, task, premises, transcript, chosen): args = [ "-p", "--json-schema", json.dumps(JUDGE_SCHEMA), - *model_flags("LOOP_CLAUDE_JUDGE_MODEL", chosen), + *model_args("LOOP_CLAUDE_JUDGE_MODEL", chosen), "--no-session-persistence", "--output-format", "json", "--permission-mode", "bypassPermissions", @@ -538,7 +538,7 @@ def interrupt(root, session_id, chosen, path, question): return "stdin or stdout is not a terminal" trust(checkouts(root)) before = human_turns(entries(path)) - subprocess.run(["claude", *model_flags("LOOP_CLAUDE_WORKER_MODEL", chosen), "--permission-mode", "bypassPermissions", "--resume", str(session_id)], cwd=root) + subprocess.run(["claude", *model_args("LOOP_CLAUDE_WORKER_MODEL", chosen), "--permission-mode", "bypassPermissions", "--resume", str(session_id)], cwd=root) return "" if human_turns(entries(path)) > before else "the interrupt ended without the human typing anything" diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index b69d24f1..f828e2f3 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -119,7 +119,7 @@ class CheckoutRoot(unittest.TestCase): self.assertEqual(loop.checkouts(root), [root]) -class Project(unittest.TestCase): +class ProjectName(unittest.TestCase): def test_names_a_checkout_relative_to_code_and_any_other_relative_to_root(self): with unittest.mock.patch.dict(os.environ, {"HOME": "/h"}): self.assertEqual(loop.project_name("/h/code/a/b"), "a/b")