test_builtin_resolver.py 文件源码

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

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

        # ensure git config was appended to, and that the output file was
        # opened
        self.open.assert_any_call('/t/mut/lol.git/config', 'a')
        self.open.assert_any_call('/t/res/lol.git', 'w+')

        # 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']),
            call(['git', 'ls-tree', '-r', '--long', '--full-tree',
                  tree_object],
                 cwd='/t/mut/lol.git', stdout=self.open()),
        ]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号