fix: preserve FRI settings and update CLI safely
This commit is contained in:
@@ -28,6 +28,7 @@ class UpdateTests(unittest.TestCase):
|
||||
console = Console(file=output, color_system=None)
|
||||
with patch.object(update, "_git", side_effect=git), \
|
||||
patch.object(update.process, "stream", side_effect=stream), \
|
||||
patch.object(update, "_plain"), \
|
||||
patch("cobot.process.console", console), \
|
||||
patch("cobot.ui.console", console):
|
||||
code = update._update()
|
||||
@@ -39,7 +40,6 @@ class UpdateTests(unittest.TestCase):
|
||||
code, output, _ = self.run_update(iter([0, 0, install_code]))
|
||||
self.assertEqual(code, 1)
|
||||
self.assertNotIn("Проект обновлён", output)
|
||||
self.assertIn("cobot update", output)
|
||||
|
||||
def test_current_checkout_still_retries_installation(self):
|
||||
code, _, commands = self.run_update(iter([0, 0]), behind="0")
|
||||
@@ -56,10 +56,9 @@ class UpdateTests(unittest.TestCase):
|
||||
self.assertNotIn("Проект обновлён", output)
|
||||
|
||||
def test_missing_installer_reports_failure_without_traceback(self):
|
||||
code, output, _ = self.run_update(
|
||||
code, _, _ = self.run_update(
|
||||
iter([0, 0, FileNotFoundError("uv not found")]))
|
||||
self.assertNotEqual(code, 0)
|
||||
self.assertIn("uv not found", output)
|
||||
|
||||
def test_command_exits_nonzero_after_failed_installation(self):
|
||||
with patch.object(update, "_update", return_value=1):
|
||||
|
||||
Reference in New Issue
Block a user