Skip to content

Commit add7636

Browse files
committed
Remove test_abort_cherry_pick_fail
I'm not entirely convinced there is no way for `cherry-pick --abort` to still fail but I can't think of a test case I could use to replace this. Due to newly added logic in `abort_cherry_pick()`, aborting is simply skipped if there is no CHERRY_PICK_HEAD which is why in this case it no longer fails.
1 parent f28a0a9 commit add7636

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

cherry_picker/test_cherry_picker.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -972,18 +972,6 @@ def test_abort_cherry_pick_invalid_state(tmp_git_repo_dir):
972972
cherry_picker.abort_cherry_pick()
973973

974974

975-
def test_abort_cherry_pick_fail(tmp_git_repo_dir):
976-
set_state(WORKFLOW_STATES.BACKPORT_PAUSED)
977-
978-
with mock.patch("cherry_picker.cherry_picker.validate_sha", return_value=True):
979-
cherry_picker = CherryPicker("origin", "xxx", [])
980-
981-
with mock.patch("cherry_picker.cherry_picker.wipe_cfg_vals_from_git_cfg"):
982-
cherry_picker.abort_cherry_pick()
983-
984-
assert get_state() == WORKFLOW_STATES.ABORTING_FAILED
985-
986-
987975
def test_abort_cherry_pick_success(
988976
tmp_git_repo_dir, git_branch, git_add, git_commit, git_checkout, git_cherry_pick
989977
):

0 commit comments

Comments
 (0)