1111def test_other_branch (temp_git_dir ):
1212 with temp_git_dir .as_cwd ():
1313 cmd_output ('git' , 'checkout' , '-b' , 'anotherbranch' )
14- assert is_on_branch ({'master ' }) is False
14+ assert is_on_branch ({'placeholder ' }) is False
1515
1616
1717def test_multi_branch (temp_git_dir ):
1818 with temp_git_dir .as_cwd ():
1919 cmd_output ('git' , 'checkout' , '-b' , 'another/branch' )
20- assert is_on_branch ({'master ' }) is False
20+ assert is_on_branch ({'placeholder ' }) is False
2121
2222
2323def test_multi_branch_fail (temp_git_dir ):
@@ -26,9 +26,10 @@ def test_multi_branch_fail(temp_git_dir):
2626 assert is_on_branch ({'another/branch' }) is True
2727
2828
29- def test_master_branch (temp_git_dir ):
29+ def test_exact_branch (temp_git_dir ):
3030 with temp_git_dir .as_cwd ():
31- assert is_on_branch ({'master' }) is True
31+ cmd_output ('git' , 'checkout' , '-b' , 'branchname' )
32+ assert is_on_branch ({'branchname' }) is True
3233
3334
3435def test_main_branch_call (temp_git_dir ):
@@ -50,11 +51,11 @@ def test_branch_pattern_fail(temp_git_dir):
5051 assert is_on_branch (set (), {'another/.*' }) is True
5152
5253
53- @pytest .mark .parametrize ('branch_name' , ('master ' , 'another/branch' ))
54+ @pytest .mark .parametrize ('branch_name' , ('somebranch ' , 'another/branch' ))
5455def test_branch_pattern_multiple_branches_fail (temp_git_dir , branch_name ):
5556 with temp_git_dir .as_cwd ():
5657 cmd_output ('git' , 'checkout' , '-b' , branch_name )
57- assert main (('--branch' , 'master ' , '--pattern' , 'another/.*' ))
58+ assert main (('--branch' , 'somebranch ' , '--pattern' , 'another/.*' ))
5859
5960
6061def test_main_default_call (temp_git_dir ):
0 commit comments