Skip to content

Commit 061c63d

Browse files
authored
Fix the tests (#76)
* Fix the test for already existing branch Introduced in #39 * Fix the test for backport pause and continue Introduced in #43
1 parent 766f76c commit 061c63d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cherry_picker/test_cherry_picker.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -986,12 +986,13 @@ def test_backport_cherry_pick_crash_ignored(
986986

987987

988988
def test_backport_cherry_pick_branch_already_exists(
989-
tmp_git_repo_dir, git_branch, git_add, git_commit, git_checkout
989+
tmp_git_repo_dir, git_branch, git_add, git_commit, git_checkout, git_remote
990990
):
991991
cherry_pick_target_branches = ("3.8",)
992992
pr_remote = "origin"
993993
test_file = "some.file"
994994
tmp_git_repo_dir.join(test_file).write("some contents")
995+
git_remote("add", pr_remote, "https://github.com/python/cpython.git")
995996
git_branch(cherry_pick_target_branches[0])
996997
git_branch(
997998
f"{pr_remote}/{cherry_pick_target_branches[0]}", cherry_pick_target_branches[0]
@@ -1052,12 +1053,13 @@ def test_backport_success(
10521053
@pytest.mark.parametrize("already_committed", (True, False))
10531054
@pytest.mark.parametrize("push", (True, False))
10541055
def test_backport_pause_and_continue(
1055-
tmp_git_repo_dir, git_branch, git_add, git_commit, git_checkout, git_reset, already_committed, push
1056+
tmp_git_repo_dir, git_branch, git_add, git_commit, git_checkout, git_reset, git_remote, already_committed, push
10561057
):
10571058
cherry_pick_target_branches = ("3.8",)
10581059
pr_remote = "origin"
10591060
test_file = "some.file"
10601061
tmp_git_repo_dir.join(test_file).write("some contents")
1062+
git_remote("add", pr_remote, "https://github.com/python/cpython.git")
10611063
git_branch(cherry_pick_target_branches[0])
10621064
git_branch(
10631065
f"{pr_remote}/{cherry_pick_target_branches[0]}", cherry_pick_target_branches[0]

0 commit comments

Comments
 (0)