mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Optimize tests: test_applehelp_output
This commit is contained in:
parent
b035094067
commit
47b33e93e5
7
tests/roots/test-basic/conf.py
Normal file
7
tests/roots/test-basic/conf.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
master_doc = 'index'
|
||||||
|
|
||||||
|
latex_documents = [
|
||||||
|
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||||
|
]
|
29
tests/roots/test-basic/index.rst
Normal file
29
tests/roots/test-basic/index.rst
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
The basic Sphinx documentation for testing
|
||||||
|
==========================================
|
||||||
|
|
||||||
|
Sphinx is a tool that makes it easy to create intelligent and beautiful
|
||||||
|
documentation for Python projects (or other documents consisting of multiple
|
||||||
|
reStructuredText sources), written by Georg Brandl. It was originally created
|
||||||
|
for the new Python documentation, and has excellent facilities for Python
|
||||||
|
project documentation, but C/C++ is supported as well, and more languages are
|
||||||
|
planned.
|
||||||
|
|
||||||
|
Sphinx uses reStructuredText as its markup language, and many of its strengths
|
||||||
|
come from the power and straightforwardness of reStructuredText and its parsing
|
||||||
|
and translating suite, the Docutils.
|
||||||
|
|
||||||
|
Among its features are the following:
|
||||||
|
|
||||||
|
* Output formats: HTML (including derivative formats such as HTML Help, Epub
|
||||||
|
and Qt Help), plain text, manual pages and LaTeX or direct PDF output
|
||||||
|
using rst2pdf
|
||||||
|
* Extensive cross-references: semantic markup and automatic links
|
||||||
|
for functions, classes, glossary terms and similar pieces of information
|
||||||
|
* Hierarchical structure: easy definition of a document tree, with automatic
|
||||||
|
links to siblings, parents and children
|
||||||
|
* Automatic indices: general index as well as a module index
|
||||||
|
* Code handling: automatic highlighting using the Pygments highlighter
|
||||||
|
* Flexible HTML output using the Jinja 2 templating engine
|
||||||
|
* Various extensions are available, e.g. for automatic testing of snippets
|
||||||
|
and inclusion of appropriately formatted docstrings
|
||||||
|
* Setuptools integration
|
@ -43,8 +43,11 @@ def check_localization(outdir):
|
|||||||
assert (lprojdir / 'localized.txt').isfile()
|
assert (lprojdir / 'localized.txt').isfile()
|
||||||
|
|
||||||
|
|
||||||
@with_app(buildername='applehelp')
|
@with_app(buildername='applehelp', testroot='basic', srcdir='applehelp_output',
|
||||||
|
confoverrides={'applehelp_bundle_id': 'org.sphinx-doc.Sphinx.help'})
|
||||||
def test_applehelp_output(app, status, warning):
|
def test_applehelp_output(app, status, warning):
|
||||||
|
(app.srcdir / 'en.lproj').makedirs()
|
||||||
|
(app.srcdir / 'en.lproj' / 'localized.txt').write_text('')
|
||||||
app.builder.build_all()
|
app.builder.build_all()
|
||||||
|
|
||||||
# Have to use bundle_path, not outdir, because we alter the latter
|
# Have to use bundle_path, not outdir, because we alter the latter
|
||||||
|
Loading…
Reference in New Issue
Block a user