test_main.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:ufodiff 作者: source-foundry 项目源码 文件源码
def make_testing_branch():
    repo = Repo('.')
    gitobj = repo.git
    # create 'test' branch if it doesn't exist so that it can be used for tests in this module
    git_branch_string = gitobj.branch()
    git_branch_list = git_branch_string.split("\n")
    clean_branch_list = []
    for branch in git_branch_list:
        branch = branch.replace('*', '')
        branch = branch.replace(' ', '')
        clean_branch_list.append(branch)
    if 'testing_branch' in clean_branch_list:
        pass
    else:
        gitobj.branch('testing_branch')


# deletes the temporary new git branch (testing_branch) for testing
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号