Pin the fresh start resolving the root

This commit is contained in:
2026-09-25 18:18:16 +02:00
parent 0d2bea9af9
commit f0ae9b1209
+6
View File
@@ -360,6 +360,12 @@ class Main(unittest.TestCase):
mocks[1].assert_called_once_with("/r")
mocks[2].assert_called_once_with("/r", "do it", 3, 2)
self.assertEqual(mocks[3].call_args.args[0], "/r")
stack.enter_context(unittest.mock.patch.object(sys, "argv", ["loop-claude", "do it"]))
mocks[0].return_value = "/s"
with self.assertRaises(SystemExit):
loop.main()
mocks[0].assert_called_once_with()
mocks[1].assert_called_with("/s")
self.assertIn("=== cycle 4 ===", sys.stdout.getvalue())
mocks[3].side_effect = ["claude exited 3"] * 3
stack.enter_context(unittest.mock.patch.object(sys, "argv", ["loop-claude", loop.RELOAD_FLAG, "3", "0", "/r", "do it"]))