test_builtin_resolver.py 文件源码

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

项目:omnic 作者: michaelpb 项目源码 文件源码
def test_update_when_hash_not_present(self):
        class FakeResult:
            stdout = b''
        self.subprocess.run.return_value = FakeResult
        path = 'README.md'
        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', 'fetch'], cwd='/t/mut/lol.git'),
            call(['git', 'archive', '--output=/t/res/README.md',
                  '--format=raw', tree_object, 'README.md'],
                 cwd='/t/mut/lol.git'),
        ]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号