当前位置: 首页>>代码示例>>Python>>正文


Python SphinxDocs.last_build_info方法代码示例

本文整理汇总了Python中vilya.models.sphinx_docs.SphinxDocs.last_build_info方法的典型用法代码示例。如果您正苦于以下问题:Python SphinxDocs.last_build_info方法的具体用法?Python SphinxDocs.last_build_info怎么用?Python SphinxDocs.last_build_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vilya.models.sphinx_docs.SphinxDocs的用法示例。


在下文中一共展示了SphinxDocs.last_build_info方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_pages_mode

# 需要导入模块: from vilya.models.sphinx_docs import SphinxDocs [as 别名]
# 或者: from vilya.models.sphinx_docs.SphinxDocs import last_build_info [as 别名]
 def test_pages_mode(self):
     prj = self._prj()
     self._add(prj, "code_config.yaml", self.conf)
     self._add(prj, "pages/index.html", self.html1)
     sd = SphinxDocs(prj.name)
     assert sd.builders == ["pages"]
     assert sd.last_build_info() is None
     sd.build_all()
     assert sd.last_build_info()["status"] == "success"
     builder = sd.get_builder(sd.builders[0])
     assert builder.raw_content("index.html", {}) == self.html1
开发者ID:sdgdsffdsfff,项目名称:code-1,代码行数:13,代码来源:test_docs.py

示例2: test_pages_mode

# 需要导入模块: from vilya.models.sphinx_docs import SphinxDocs [as 别名]
# 或者: from vilya.models.sphinx_docs.SphinxDocs import last_build_info [as 别名]
 def test_pages_mode(self):
     prj = self._prj()
     self._add(prj, 'code_config.yaml', self.conf)
     self._add(prj, 'pages/index.html', self.html1)
     sd = SphinxDocs(prj.name)
     assert sd.builders == [self.builder]
     assert sd.last_build_info() is None
     sd.build_all()
     assert sd.last_build_info()['status'] == 'success'
     builder = sd.get_builder(sd.builders[0])
     assert builder.raw_content('index.html', {}) == self.html1
开发者ID:leeccong,项目名称:code,代码行数:13,代码来源:test_sphinx_docs.py

示例3: test_build_info

# 需要导入模块: from vilya.models.sphinx_docs import SphinxDocs [as 别名]
# 或者: from vilya.models.sphinx_docs.SphinxDocs import last_build_info [as 别名]
 def test_build_info(self):
     prj = self._prj()
     self._add(prj, 'docs/index.rst', base_index_rst)
     self._add(prj, 'docs/doc1.rst', base_document1_rst)
     sd = SphinxDocs(prj.name)
     sd.build_all()
     bi = sd.last_build_info()
     assert bi['status'] == 'success'
开发者ID:leeccong,项目名称:code,代码行数:10,代码来源:test_sphinx_docs.py

示例4: test_build_info

# 需要导入模块: from vilya.models.sphinx_docs import SphinxDocs [as 别名]
# 或者: from vilya.models.sphinx_docs.SphinxDocs import last_build_info [as 别名]
 def test_build_info(self):
     prj = self._prj()
     self._add(prj, "code_config.yaml", base_yaml_conf)
     self._add(prj, "index.rst", base_index_rst)
     self._add(prj, "doc1.rst", base_document1_rst)
     sd = SphinxDocs(prj.name)
     sd.build_all()
     bi = sd.last_build_info()
     assert bi["status"] == "success"
开发者ID:sdgdsffdsfff,项目名称:code-1,代码行数:11,代码来源:test_docs.py

示例5: test_pages_no_docsdir

# 需要导入模块: from vilya.models.sphinx_docs import SphinxDocs [as 别名]
# 或者: from vilya.models.sphinx_docs.SphinxDocs import last_build_info [as 别名]
 def test_pages_no_docsdir(self):
     prj = self._prj()
     self._add(prj, "code_config.yaml", self.conf)
     self._add(prj, "pagesNOT_THE_SAME/index.html", self.html1)
     sd = SphinxDocs(prj.name)
     sd.build_all()
     assert sd.last_build_info()["status"] == "no_doc_dir_found"
     builder = sd.get_builder(sd.builders[0])
     assert builder.raw_content("index.html", {}) is False
开发者ID:sdgdsffdsfff,项目名称:code-1,代码行数:11,代码来源:test_docs.py

示例6: pages

# 需要导入模块: from vilya.models.sphinx_docs import SphinxDocs [as 别名]
# 或者: from vilya.models.sphinx_docs.SphinxDocs import last_build_info [as 别名]
 def pages(self, request):
     user = request.user
     docs = SphinxDocs(self.proj_name)
     tdt = {
         'project': CodeDoubanProject.get_by_name(self.proj_name),
         'request': request,
         'user': user,
         'docs': docs,
         'last_build': docs.last_build_info(),
     }
     return st('settings/pages.html', **tdt)
开发者ID:000fan000,项目名称:code,代码行数:13,代码来源:settings.py

示例7: sphinx_docs

# 需要导入模块: from vilya.models.sphinx_docs import SphinxDocs [as 别名]
# 或者: from vilya.models.sphinx_docs.SphinxDocs import last_build_info [as 别名]
 def sphinx_docs(self, request):
     user = request.user
     docs = SphinxDocs(self.proj_name)
     if request.get_form_var('force_rebuild') == 'mq':
         sphinx_builds_add(self.proj_name)
         return request.redirect(
             '/%s/settings/sphinx_docs' % self.proj_name)
     if request.get_form_var('force_rebuild') == 'direct':
         docs.build_all()
         return request.redirect(
             '/%s/settings/sphinx_docs' % self.proj_name)
     tdt = {
         'project': CodeDoubanProject.get_by_name(self.proj_name),
         'request': request,
         'enabled': docs.enabled,
         'last_build': docs.last_build_info(),
         'user': user,
     }
     return st('settings/sphinx_docs.html', **tdt)
开发者ID:000fan000,项目名称:code,代码行数:21,代码来源:settings.py


注:本文中的vilya.models.sphinx_docs.SphinxDocs.last_build_info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。