test_builtin_resolver.py 文件源码

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

项目:omnic 作者: michaelpb 项目源码 文件源码
def test_download_directory_git(self):
        path = '/'
        git_url = 'git://githoobie.com/lol.git<%s><%s>' % (tree_object, path)
        await self._do_download(git_url)
        self._check_config()

        # ensure the sequence of git commands were called
        assert self.subprocess.run.mock_calls == [
            call(['git', 'clone', '--bare',
                  'git://githoobie.com/lol.git', '/t/mut/lol.git'],
                  cwd='/t/mut'),
            call(['git', 'rev-parse', '--quiet', '--verify', tree_object],
                 cwd='/t/mut/lol.git', stdout=-1),
            call(['git', 'archive', '--prefix=/t/res/lol.git',
                  '--format=directory', tree_object],
                 cwd='/t/mut/lol.git'),
        ]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号