Beispiel #1
0
def test_install_doxy(doc_worktree, tmpdir):
    doc_worktree.add_test_project("libqi/doc/doxygen")
    doc_builder = DocBuilder(doc_worktree, "qi-api")
    inst_dir = tmpdir.join("inst")
    doc_builder.configure()
    doc_builder.build()
    doc_builder.install(inst_dir.strpath)
    assert "qi" in inst_dir.join("index.html").read()
def test_install_doxy(doc_worktree, tmpdir):
    doc_worktree.add_test_project("libqi/doc/doxygen")
    doc_builder = DocBuilder(doc_worktree, "qi-api")
    inst_dir = tmpdir.join("inst")
    doc_builder.configure()
    doc_builder.build()
    doc_builder.install(inst_dir.strpath)
    assert "qi" in inst_dir.join("index.html").read()
def test_setting_language(doc_worktree):
    translateme_proj = doc_worktree.add_test_project("translateme")
    doc_builder = DocBuilder(doc_worktree, "translateme")
    doc_builder.language = "fr"
    doc_builder.configure()
    with mock.patch("sphinx.main") as mock_sphinx:
        mock_sphinx.return_value = 0
        doc_builder.build()
        args_list = mock_sphinx.call_args_list
        assert len(args_list) == 1
        last_call = args_list[0]
        argv = last_call[1]["argv"]
        assert "-Dlanguage=fr" in argv