Pin that one override still asks, and say where the catalog and the entry go
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user