Skip to content

Commit 9873e90

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 79a95a8 commit 9873e90

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
@@ -983,18 +983,6 @@ def test_abort_cherry_pick_invalid_state(tmp_git_repo_dir):
983983
cherry_picker.abort_cherry_pick()
984984

985985

986-
def test_abort_cherry_pick_fail(tmp_git_repo_dir):
987-
set_state(WORKFLOW_STATES.BACKPORT_PAUSED)
988-
989-
with mock.patch("cherry_picker.cherry_picker.validate_sha", return_value=True):
990-
cherry_picker = CherryPicker("origin", "xxx", [])
991-
992-
with mock.patch("cherry_picker.cherry_picker.wipe_cfg_vals_from_git_cfg"):
993-
cherry_picker.abort_cherry_pick()
994-
995-
assert get_state() == WORKFLOW_STATES.ABORTING_FAILED
996-
997-
998986
def test_abort_cherry_pick_success(
999987
tmp_git_repo_dir, git_branch, git_add, git_commit, git_checkout, git_cherry_pick
1000988
):

0 commit comments

Comments
 (0)