test_docs.py 文件源码

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

项目:Taigabot 作者: FrozenPigs 项目源码 文件源码
def test_add_file_and_commit(self, rw_dir):
        import git

        repo_dir = osp.join(rw_dir, 'my-new-repo')
        file_name = osp.join(repo_dir, 'new-file')

        r = git.Repo.init(repo_dir)
        # This function just creates an empty file ...
        open(file_name, 'wb').close()
        r.index.add([file_name])
        r.index.commit("initial commit")

        # ![test_add_file_and_commit]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号