Pin that one override still asks, and say where the catalog and the entry go

This commit is contained in:
2026-09-26 19:59:43 +02:00
parent d4ae61a685
commit 413aa2f638
3 changed files with 7 additions and 4 deletions
+4 -1
View File
@@ -158,10 +158,13 @@ class ProjectModel(unittest.TestCase):
with unittest.mock.patch("sys.stdin.isatty", return_value=False), self.assertRaises(SystemExit) as stopped:
loop.project_model("/srv/a")
self.assertEqual(stopped.exception.code, 2)
self.assertIn(f'add "srv/a": "<model>" to {saved}', sys.stderr.getvalue())
self.assertIn(f'add "srv/a": "<model>" to the JSON object in {saved}', sys.stderr.getvalue())
self.assertFalse(saved.exists())
with unittest.mock.patch.dict(os.environ, {"LOOP_CLAUDE_JUDGE_MODEL": "j", "LOOP_CLAUDE_WORKER_MODEL": "w"}), unittest.mock.patch("sys.stdin.isatty", return_value=False):
self.assertEqual(loop.project_model("/srv/a"), "")
with unittest.mock.patch.dict(os.environ, {"LOOP_CLAUDE_JUDGE_MODEL": "j"}), unittest.mock.patch("sys.stdin.isatty", return_value=False), self.assertRaises(SystemExit) as stopped:
loop.project_model("/srv/a")
self.assertEqual(stopped.exception.code, 2)
with (
unittest.mock.patch("sys.stdin.isatty", return_value=True),
unittest.mock.patch("sys.stdout.isatty", return_value=True),