def test_get_new_command(git_not_command, git_not_command_one_of_this,
                         git_not_command_closest):
    assert (get_new_command(Command('git brnch', stderr=git_not_command))
            == ['git branch'])
    assert (get_new_command(Command('git st', stderr=git_not_command_one_of_this))
            == ['git stats', 'git stash', 'git stage'])
    assert (get_new_command(Command('git tags', stderr=git_not_command_closest))
            == ['git tag', 'git stage'])
Esempio n. 2
0
def test_get_new_command(git_not_command, git_not_command_one_of_this,
                         git_not_command_closest):
    assert get_new_command(Command('git brnch', stderr=git_not_command)) \
           == ['git branch']
    assert get_new_command(Command('git st', stderr=git_not_command_one_of_this)) \
           == ['git stats', 'git stash', 'git stage']
    assert get_new_command(Command('git tags', stderr=git_not_command_closest)) \
           == ['git tag', 'git stage']
Esempio n. 3
0
def test_get_new_command(git_not_command, git_not_command_one_of_this,
                         git_not_command_closest):
    assert get_new_command(Command('git brnch', stderr=git_not_command), None) \
           == 'git branch'
    assert get_new_command(Command('git st', stderr=git_not_command_one_of_this),
                           None) == 'git status'
    assert get_new_command(Command('git tags', stderr=git_not_command_closest),
                           None) == 'git tag'
def test_get_new_command(git_not_command, git_not_command_one_of_this,
                         git_not_command_closest):
    assert get_new_command(Command("git brnch",
                                   git_not_command)) == ["git branch"]
    assert get_new_command(Command("git st", git_not_command_one_of_this)) == [
        "git stats",
        "git stash",
        "git stage",
    ]
    assert get_new_command(Command("git tags", git_not_command_closest)) == [
        "git tag",
        "git stage",
    ]
Esempio n. 5
0
def test_get_new_command(git_not_command, git_not_command_one_of_this):
    assert get_new_command(Command('git brnch', stderr=git_not_command), None)\
        == 'git branch'
    assert get_new_command(Command('git st', stderr=git_not_command_one_of_this),
                           None) == 'git status'
def test_get_new_command(git_not_command):
    assert get_new_command(Command('git brnch', '', git_not_command), None)\
        == 'git branch'
def test_get_new_command(git_not_command, git_not_command_one_of_this):
    assert get_new_command(Command('git brnch', '', git_not_command), None)\
        == 'git branch'
    assert get_new_command(
        Command('git st', '', git_not_command_one_of_this), None) == 'git status'