Пример #1
0
def test_get_git_branch(runner):
    with runner.isolated_filesystem():
        with open('junk.txt', 'w') as fp:
            fp.write('doin it live')
        subprocess.call(['git', 'init'])
        subprocess.call(['git', 'add', '.'])
        subprocess.call(['git', 'commit', '-c', '"initial commit"'])
        branch = doitlive.get_current_git_branch()
        assert branch == 'master'
Пример #2
0
def test_get_git_branch(runner):
    with runner.isolated_filesystem():
        with open("junk.txt", "w") as fp:
            fp.write("doin it live")
        subprocess.call(["git", "init"])
        subprocess.call(["git", "add", "."])
        subprocess.call(["git", "commit", "-c", '"initial commit"'])
        branch = doitlive.get_current_git_branch()
        assert branch == "master"
Пример #3
0
def test_get_git_branch(runner):
    with runner.isolated_filesystem():
        with open('junk.txt', 'w') as fp:
            fp.write('doin it live')
        subprocess.call(['git', 'init'])
        subprocess.call(['git', 'add', '.'])
        subprocess.call(['git', 'commit', '-c', '"initial commit"'])
        branch = doitlive.get_current_git_branch()
        assert branch == 'master'