executet 'ruff format --check .'
Some checks failed
Mark stable commit / test-unit (push) Has been cancelled
Mark stable commit / test-integration (push) Has been cancelled
Mark stable commit / test-env-virtual (push) Has been cancelled
Mark stable commit / test-env-nix (push) Has been cancelled
Mark stable commit / test-e2e (push) Has been cancelled
Mark stable commit / test-virgin-user (push) Has been cancelled
Mark stable commit / test-virgin-root (push) Has been cancelled
Mark stable commit / lint-shell (push) Has been cancelled
Mark stable commit / lint-python (push) Has been cancelled
Mark stable commit / mark-stable (push) Has been cancelled

This commit is contained in:
Kevin Veen-Birkenbach
2025-12-18 14:04:44 +01:00
parent 763f02a9a4
commit f4339a746a
155 changed files with 1327 additions and 636 deletions

View File

@@ -27,7 +27,9 @@ class TestCliBranch(unittest.TestCase):
# ------------------------------------------------------------------
@patch("pkgmgr.cli.commands.branch.open_branch")
def test_handle_branch_open_forwards_args_to_open_branch(self, mock_open_branch) -> None:
def test_handle_branch_open_forwards_args_to_open_branch(
self, mock_open_branch
) -> None:
"""
handle_branch('open') should call open_branch with name, base and cwd='.'.
"""
@@ -49,7 +51,9 @@ class TestCliBranch(unittest.TestCase):
self.assertEqual(call_kwargs.get("cwd"), ".")
@patch("pkgmgr.cli.commands.branch.open_branch")
def test_handle_branch_open_uses_default_base_when_not_set(self, mock_open_branch) -> None:
def test_handle_branch_open_uses_default_base_when_not_set(
self, mock_open_branch
) -> None:
"""
If --base is not passed, argparse gives base='main' (default),
and handle_branch should propagate that to open_branch.
@@ -75,7 +79,9 @@ class TestCliBranch(unittest.TestCase):
# ------------------------------------------------------------------
@patch("pkgmgr.cli.commands.branch.close_branch")
def test_handle_branch_close_forwards_args_to_close_branch(self, mock_close_branch) -> None:
def test_handle_branch_close_forwards_args_to_close_branch(
self, mock_close_branch
) -> None:
"""
handle_branch('close') should call close_branch with name, base,
cwd='.' and force=False by default.
@@ -100,7 +106,9 @@ class TestCliBranch(unittest.TestCase):
self.assertFalse(call_kwargs.get("force"))
@patch("pkgmgr.cli.commands.branch.close_branch")
def test_handle_branch_close_uses_default_base_when_not_set(self, mock_close_branch) -> None:
def test_handle_branch_close_uses_default_base_when_not_set(
self, mock_close_branch
) -> None:
"""
If --base is not passed for 'close', argparse gives base='main'
(default), and handle_branch should propagate that to close_branch.
@@ -153,7 +161,9 @@ class TestCliBranch(unittest.TestCase):
# ------------------------------------------------------------------
@patch("pkgmgr.cli.commands.branch.drop_branch")
def test_handle_branch_drop_forwards_args_to_drop_branch(self, mock_drop_branch) -> None:
def test_handle_branch_drop_forwards_args_to_drop_branch(
self, mock_drop_branch
) -> None:
"""
handle_branch('drop') should call drop_branch with name, base,
cwd='.' and force=False by default.
@@ -178,7 +188,9 @@ class TestCliBranch(unittest.TestCase):
self.assertFalse(call_kwargs.get("force"))
@patch("pkgmgr.cli.commands.branch.drop_branch")
def test_handle_branch_drop_uses_default_base_when_not_set(self, mock_drop_branch) -> None:
def test_handle_branch_drop_uses_default_base_when_not_set(
self, mock_drop_branch
) -> None:
"""
If --base is not passed for 'drop', argparse gives base='main'
(default), and handle_branch should propagate that to drop_branch.