test_main.py 文件源码

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

项目:ufodiff 作者: source-foundry 项目源码 文件源码
def delete_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:
        gitobj.branch('-d', 'testing_branch')

# ///////////////////////////////////////////////////////
#
# pytest capsys capture tests
#    confirms capture of std output and std error streams
#
# ///////////////////////////////////////////////////////
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号