1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-10-08 12:53:58 +01:00

Allow multiple returns from git_checkout (#1022)

* Allow multiple returns from git_checkout

* Remove multiple returns
This commit is contained in:
David Hart
2020-01-13 22:28:20 +00:00
committed by Vladimir Iakovlev
parent b28ece0f34
commit 2ced7a7f33
2 changed files with 16 additions and 10 deletions

View File

@@ -56,18 +56,18 @@ def test_get_branches(branches, branch_list, git_branch):
@pytest.mark.parametrize('branches, command, new_command', [
(b'',
Command('git checkout unknown', did_not_match('unknown')),
'git checkout -b unknown'),
['git checkout -b unknown']),
(b'',
Command('git commit unknown', did_not_match('unknown')),
'git branch unknown && git commit unknown'),
['git branch unknown && git commit unknown']),
(b' test-random-branch-123',
Command('git checkout tst-rdm-brnch-123',
did_not_match('tst-rdm-brnch-123')),
'git checkout test-random-branch-123'),
['git checkout test-random-branch-123', 'git checkout -b tst-rdm-brnch-123']),
(b' test-random-branch-123',
Command('git commit tst-rdm-brnch-123',
did_not_match('tst-rdm-brnch-123')),
'git commit test-random-branch-123')])
['git commit test-random-branch-123'])])
def test_get_new_command(branches, command, new_command, git_branch):
git_branch(branches)
assert get_new_command(command) == new_command