def test_get_new_command(stderr): assert get_new_command(Command('git push', stderr=stderr))\ == "git push --set-upstream origin master" assert get_new_command(Command('git push -u origin', stderr=stderr))\ == "git push --set-upstream origin master" assert get_new_command(Command('git push --set-upstream origin', stderr=stderr))\ == "git push --set-upstream origin master" assert get_new_command(Command('git push --quiet', stderr=stderr))\ == "git push --set-upstream origin master --quiet"
def test_get_new_command(output): assert get_new_command(Command('git push', output))\ == "git push --set-upstream origin master" assert get_new_command(Command('git push -u', output))\ == "git push --set-upstream origin master" assert get_new_command(Command('git push -u origin', output))\ == "git push --set-upstream origin master" assert get_new_command(Command('git push --set-upstream origin', output))\ == "git push --set-upstream origin master" assert get_new_command(Command('git push --quiet', output))\ == "git push --set-upstream origin master --quiet"
def test_get_new_command(stderr): assert get_new_command(Command('git push', stderr=stderr))\ == "git push --set-upstream origin master" assert get_new_command(Command('git push -u', stderr=stderr))\ == "git push --set-upstream origin master" assert get_new_command(Command('git push -u origin', stderr=stderr))\ == "git push --set-upstream origin master" assert get_new_command(Command('git push --set-upstream origin', stderr=stderr))\ == "git push --set-upstream origin master" assert get_new_command(Command('git push --quiet', stderr=stderr))\ == "git push --set-upstream origin master --quiet"
def test_get_new_command(output, script, branch_name, new_command): assert get_new_command(Command(script, output)) == new_command
def test_get_new_command(output, script, branch_name, new_command): assert get_new_command(Command(script, output)) == new_command
def test_get_new_command(stderr): assert get_new_command(Command(stderr=stderr), None)\ == "git push --set-upstream origin master"