Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5f7faf commit 04e31d5Copy full SHA for 04e31d5
cherry_picker/cherry_picker/test.py
@@ -33,15 +33,16 @@ def changedir(d):
33
34
35
def test_get_base_branch():
36
+ # The format of cherry-pick branches we create are "backport-{SHA}-{base_branch}"
37
cherry_pick_branch = 'backport-afc23f4-2.7'
38
result = get_base_branch(cherry_pick_branch)
39
assert result == '2.7'
40
41
-def test_get_base_branch_without_dash():
42
- cherry_pick_branch ='master'
+def test_get_base_branch_which_has_dashes():
43
+ cherry_pick_branch ='backport-afc23f4-baseprefix-2.7-basesuffix'
44
- assert result == 'master'
45
+ assert result == 'prefix-2.7-suffix'
46
47
48
@mock.patch('subprocess.check_output')
0 commit comments