[Python-checkins] r65993 - in doctools/trunk: doc/intro.rst sphinx/ext/doctest.py tests/test_application.py tests/test_build.py tests/test_config.py tests/test_i18n.py tests/util.py
georg.brandl
python-checkins at python.org
Sat Aug 23 17:04:46 CEST 2008
Author: georg.brandl
Date: Sat Aug 23 17:04:45 2008
New Revision: 65993
Log:
Merged revisions 65640,65675,65699,65701 via svnmerge from
svn+ssh://pythondev@svn.python.org/doctools/branches/0.4.x
........
r65640 | georg.brandl | 2008-08-11 16:11:17 +0200 (Mon, 11 Aug 2008) | 2 lines
More info in intro.
........
r65675 | georg.brandl | 2008-08-14 13:53:02 +0200 (Thu, 14 Aug 2008) | 2 lines
#3546: add missing linebreak.
........
r65699 | benjamin.peterson | 2008-08-15 23:02:22 +0200 (Fri, 15 Aug 2008) | 4 lines
rename util.with_testapp to util.with_app; nose was running it
also make an assert more informative
........
r65701 | benjamin.peterson | 2008-08-16 00:00:54 +0200 (Sat, 16 Aug 2008) | 1 line
add some tests for sphinx.application
........
Added:
doctools/trunk/tests/test_application.py
- copied unchanged from r65701, /doctools/branches/0.4.x/tests/test_application.py
Modified:
doctools/trunk/ (props changed)
doctools/trunk/doc/intro.rst
doctools/trunk/sphinx/ext/doctest.py
doctools/trunk/tests/test_build.py
doctools/trunk/tests/test_config.py
doctools/trunk/tests/test_i18n.py
doctools/trunk/tests/util.py
Modified: doctools/trunk/doc/intro.rst
==============================================================================
--- doctools/trunk/doc/intro.rst (original)
+++ doctools/trunk/doc/intro.rst Sat Aug 23 17:04:45 2008
@@ -3,15 +3,18 @@
This is the documentation for the Sphinx documentation builder. Sphinx is a
tool that translates a set of reStructuredText_ source files into various output
-formats, automatically producing cross-references, indices etc.
+formats, automatically producing cross-references, indices etc. That is, if
+you have a directory containing a bunch of reST-formatted documents (and
+possibly subdirectories of docs in there as well), Sphinx can generate a
+nicely-organized arrangement of HTML files (in some other directory) for easy
+browsing and navigation. But from the same source, it can also generate a
+LaTeX file that you can compile into a PDF version of the documents.
The focus is on hand-written documentation, rather than auto-generated API docs.
Though there is limited support for that kind of docs as well (which is intended
to be freely mixed with hand-written content), if you need pure API docs have a
look at `Epydoc <http://epydoc.sf.net/>`_, which also understands reST.
-.. XXX web app
-
Prerequisites
-------------
Modified: doctools/trunk/sphinx/ext/doctest.py
==============================================================================
--- doctools/trunk/sphinx/ext/doctest.py (original)
+++ doctools/trunk/sphinx/ext/doctest.py Sat Aug 23 17:04:45 2008
@@ -285,7 +285,7 @@
group.name, filename, code[0].lineno)
if not test.examples:
self._out('WARNING: no examples in doctest block at '
- + filename + ', line %s' % code[0].lineno)
+ + filename + ', line %s\n' % code[0].lineno)
continue
for example in test.examples:
# apply directive's comparison options
Modified: doctools/trunk/tests/test_build.py
==============================================================================
--- doctools/trunk/tests/test_build.py (original)
+++ doctools/trunk/tests/test_build.py Sat Aug 23 17:04:45 2008
@@ -65,7 +65,7 @@
return name
- at with_testapp(buildername='html', warning=html_warnfile)
+ at with_app(buildername='html', warning=html_warnfile)
def test_html(app):
app.builder.build_all()
html_warnings = html_warnfile.getvalue().replace(os.sep, '/')
@@ -94,7 +94,7 @@
'path %s in %s' % (text, path, fname))
- at with_testapp(buildername='latex', warning=latex_warnfile)
+ at with_app(buildername='latex', warning=latex_warnfile)
def test_latex(app):
LaTeXTranslator.ignore_missing_images = True
app.builder.build_all()
@@ -124,14 +124,14 @@
# just let the remaining ones run for now
- at with_testapp(buildername='linkcheck')
+ at with_app(buildername='linkcheck')
def test_linkcheck(app):
app.builder.build_all()
- at with_testapp(buildername='text')
+ at with_app(buildername='text')
def test_text(app):
app.builder.build_all()
- at with_testapp(buildername='changes', cleanenv=True)
+ at with_app(buildername='changes', cleanenv=True)
def test_changes(app):
app.builder.build_all()
Modified: doctools/trunk/tests/test_config.py
==============================================================================
--- doctools/trunk/tests/test_config.py (original)
+++ doctools/trunk/tests/test_config.py Sat Aug 23 17:04:45 2008
@@ -15,7 +15,7 @@
from sphinx.application import ExtensionError
- at with_testapp(confoverrides={'master_doc': 'master', 'nonexisting_value': 'True'})
+ at with_app(confoverrides={'master_doc': 'master', 'nonexisting_value': 'True'})
def test_core_config(app):
cfg = app.config
@@ -61,7 +61,7 @@
assert cfg['project'] == cfg.project == 'Sphinx Tests'
- at with_testapp()
+ at with_app()
def test_extension_values(app):
cfg = app.config
Modified: doctools/trunk/tests/test_i18n.py
==============================================================================
--- doctools/trunk/tests/test_i18n.py (original)
+++ doctools/trunk/tests/test_i18n.py Sat Aug 23 17:04:45 2008
@@ -12,6 +12,6 @@
from util import *
- at with_testapp(confoverrides={'language': 'de'})
+ at with_app(confoverrides={'language': 'de'})
def test_i18n(app):
app.builder.build_all()
Modified: doctools/trunk/tests/util.py
==============================================================================
--- doctools/trunk/tests/util.py (original)
+++ doctools/trunk/tests/util.py Sat Aug 23 17:04:45 2008
@@ -25,7 +25,7 @@
__all__ = [
'test_root',
'raises', 'raises_msg', 'Struct',
- 'ListOutput', 'TestApp', 'with_testapp',
+ 'ListOutput', 'TestApp', 'with_app',
'path', 'with_tempdir', 'write_file',
'sprint',
]
@@ -60,7 +60,7 @@
try:
func(*args, **kwds)
except exc, err:
- assert msg in str(err)
+ assert msg in str(err), "\"%s\" not in \"%s\"" % (msg, err)
else:
raise AssertionError('%s did not raise %s' %
(func.__name__, _excstr(exc)))
@@ -140,7 +140,7 @@
shutil.rmtree(tree, True)
-def with_testapp(*args, **kwargs):
+def with_app(*args, **kwargs):
"""
Make a TestApp with args and kwargs, pass it to the test and clean up
properly.
More information about the Python-checkins
mailing list