Skip to content

Commit

Permalink
Fix the tests (#76)
Browse files Browse the repository at this point in the history
* Fix the test for already existing branch

Introduced in #39

* Fix the test for backport pause and continue

Introduced in #43
  • Loading branch information
Jackenmen authored Oct 4, 2022
1 parent 766f76c commit 061c63d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cherry_picker/test_cherry_picker.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,12 +986,13 @@ def test_backport_cherry_pick_crash_ignored(


def test_backport_cherry_pick_branch_already_exists(
tmp_git_repo_dir, git_branch, git_add, git_commit, git_checkout
tmp_git_repo_dir, git_branch, git_add, git_commit, git_checkout, git_remote
):
cherry_pick_target_branches = ("3.8",)
pr_remote = "origin"
test_file = "some.file"
tmp_git_repo_dir.join(test_file).write("some contents")
git_remote("add", pr_remote, "https://github.com/python/cpython.git")
git_branch(cherry_pick_target_branches[0])
git_branch(
f"{pr_remote}/{cherry_pick_target_branches[0]}", cherry_pick_target_branches[0]
Expand Down Expand Up @@ -1052,12 +1053,13 @@ def test_backport_success(
@pytest.mark.parametrize("already_committed", (True, False))
@pytest.mark.parametrize("push", (True, False))
def test_backport_pause_and_continue(
tmp_git_repo_dir, git_branch, git_add, git_commit, git_checkout, git_reset, already_committed, push
tmp_git_repo_dir, git_branch, git_add, git_commit, git_checkout, git_reset, git_remote, already_committed, push
):
cherry_pick_target_branches = ("3.8",)
pr_remote = "origin"
test_file = "some.file"
tmp_git_repo_dir.join(test_file).write("some contents")
git_remote("add", pr_remote, "https://github.com/python/cpython.git")
git_branch(cherry_pick_target_branches[0])
git_branch(
f"{pr_remote}/{cherry_pick_target_branches[0]}", cherry_pick_target_branches[0]
Expand Down

0 comments on commit 061c63d

Please sign in to comment.