Skip to content

Commit f90d993

Browse files
committed
Update tests to check for base branches which have dashes in them.
1 parent c5f7faf commit f90d993

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cherry_picker/cherry_picker/test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,16 @@ def changedir(d):
3333

3434

3535
def test_get_base_branch():
36+
# The format of cherry-pick branches we create are "backport-{SHA}-{base_branch}"
3637
cherry_pick_branch = 'backport-afc23f4-2.7'
3738
result = get_base_branch(cherry_pick_branch)
3839
assert result == '2.7'
3940

4041

41-
def test_get_base_branch_without_dash():
42-
cherry_pick_branch ='master'
42+
def test_get_base_branch_which_has_dashes():
43+
cherry_pick_branch ='backport-afc23f4-baseprefix-2.7-basesuffix'
4344
result = get_base_branch(cherry_pick_branch)
44-
assert result == 'master'
45+
assert result == 'baseprefix-2.7-basesuffix'
4546

4647

4748
@mock.patch('subprocess.check_output')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy