test_pre_build.py 文件源码

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

项目:sphinxcontrib-versioning 作者: Robpol86 项目源码 文件源码
def test_single(local_docs):
    """With single version.

    :param local_docs: conftest fixture.
    """
    versions = Versions(gather_git_info(str(local_docs), ['conf.py'], tuple(), tuple()))
    assert len(versions) == 1

    # Run and verify directory.
    exported_root = py.path.local(pre_build(str(local_docs), versions))
    assert len(exported_root.listdir()) == 1
    assert exported_root.join(versions['master']['sha'], 'conf.py').read() == ''

    # Verify root_dir and master_doc..
    expected = ['master/contents']
    assert sorted(posixpath.join(r['root_dir'], r['master_doc']) for r in versions.remotes) == expected
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号