diff options
| author | Georg Brandl <georg@python.org> | 2014-01-17 07:25:31 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2014-01-17 07:25:31 +0100 |
| commit | caf7fccc80bc2fb485599113bb4e977de0729169 (patch) | |
| tree | a841e992d1dacb1468656a5584e3ab93b72ed44e /tests | |
| parent | 97df8becb0e97373d76c5d8809d50711a987cf92 (diff) | |
| parent | d0dccd32a9d4e0960c5be9a801b14a3739670684 (diff) | |
| download | sphinx-caf7fccc80bc2fb485599113bb4e977de0729169.tar.gz | |
merge with stable
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/root/conf.py | 2 | ||||
| -rw-r--r-- | tests/root/includes.txt | 1 | ||||
| -rw-r--r-- | tests/root/objects.txt | 9 | ||||
| -rw-r--r-- | tests/test_build_html.py | 5 | ||||
| -rw-r--r-- | tests/test_config.py | 8 | ||||
| -rw-r--r-- | tests/test_intersphinx.py | 4 | ||||
| -rw-r--r-- | tests/test_quickstart.py | 1 |
7 files changed, 11 insertions, 19 deletions
diff --git a/tests/root/conf.py b/tests/root/conf.py index 8025ba33..3399043f 100644 --- a/tests/root/conf.py +++ b/tests/root/conf.py @@ -8,7 +8,7 @@ sys.path.append(os.path.abspath('..')) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.jsmath', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.autosummary', 'sphinx.ext.doctest', 'sphinx.ext.extlinks', - 'sphinx.ext.viewcode', 'sphinx.ext.oldcmarkup', 'ext'] + 'sphinx.ext.viewcode', 'ext'] jsmath_path = 'dummy.js' diff --git a/tests/root/includes.txt b/tests/root/includes.txt index 904f0677..08917811 100644 --- a/tests/root/includes.txt +++ b/tests/root/includes.txt @@ -40,6 +40,7 @@ Literalinclude options .. cssclass:: inc-lines .. literalinclude:: literal.inc :lines: 6-7,9 + :lineno-start: 6 .. cssclass:: inc-startend .. literalinclude:: literal.inc diff --git a/tests/root/objects.txt b/tests/root/objects.txt index 57e82212..73661d22 100644 --- a/tests/root/objects.txt +++ b/tests/root/objects.txt @@ -101,6 +101,7 @@ Referring to :func:`nothing <>`. :type hour: DuplicateType :param hour: Duplicate param. Should not lead to crashes. :type hour: DuplicateType + :param .Cls extcls: A class from another module. C items @@ -117,14 +118,6 @@ C items .. c:var:: sphinx_global -Old C items (from oldcmarkup ext) ---------------------------------- - -.. cfunction:: Sphinx_Func() - -Refer to :cfunc:`Sphinx_Func`. - - Javascript items ================ diff --git a/tests/test_build_html.py b/tests/test_build_html.py index ef8e3888..603ad546 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -44,9 +44,6 @@ reading included file u'.*?wrongenc.inc' seems to be wrong, try giving an \ %(root)s/includes.txt:4: WARNING: download file not readable: .*?nonexisting.png %(root)s/markup.txt:\\d+: WARNING: Malformed :option: u'Python c option', does \ not contain option marker - or -- or / -%(root)s/objects.txt:\\d*: WARNING: using old C markup; please migrate to \ -new-style markup \(e.g. c:function instead of cfunction\), see \ -http://sphinx-doc.org/domains.html """ HTML_WARNINGS = ENV_WARNINGS + """\ @@ -191,8 +188,6 @@ HTML_XPATH = { (".//a[@href='#c.SPHINX_USE_PYTHON']", ''), (".//a[@href='#c.SphinxType']", ''), (".//a[@href='#c.sphinx_global']", ''), - # reference from old C markup extension - (".//a[@href='#c.Sphinx_Func']", ''), # test global TOC created by toctree() (".//ul[@class='current']/li[@class='toctree-l1 current']/a[@href='']", 'Testing object descriptions'), diff --git a/tests/test_config.py b/tests/test_config.py index 4d3d51b0..ea6f3ba4 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -19,7 +19,8 @@ from sphinx.util.pycompat import b @with_app(confoverrides={'master_doc': 'master', 'nonexisting_value': 'True', - 'latex_elements.docclass': 'scrartcl'}) + 'latex_elements.docclass': 'scrartcl', + 'modindex_common_prefix': 'path1,path2'}) def test_core_config(app): cfg = app.config @@ -31,6 +32,7 @@ def test_core_config(app): # overrides assert cfg.master_doc == 'master' assert cfg.latex_elements['docclass'] == 'scrartcl' + assert cfg.modindex_common_prefix == ['path1', 'path2'] # simple default values assert 'locale_dirs' not in cfg.__dict__ @@ -92,7 +94,7 @@ def test_errors_warnings(dir): write_file(dir / 'conf.py', u'# -*- coding: utf-8\n\n' u'project = u"Jägermeister"\n', 'utf-8') cfg = Config(dir, 'conf.py', {}, None) - cfg.init_values() + cfg.init_values(lambda warning: 1/0) assert cfg.project == u'Jägermeister' # test the warning for bytestrings with non-ascii content @@ -122,5 +124,5 @@ def test_config_eol(tmpdir): for eol in ('\n', '\r\n'): configfile.write_bytes(b('project = "spam"' + eol)) cfg = Config(tmpdir, 'conf.py', {}, None) - cfg.init_values() + cfg.init_values(lambda warning: 1/0) assert cfg.project == u'spam' diff --git a/tests/test_intersphinx.py b/tests/test_intersphinx.py index a8679e7e..8ce02cc1 100644 --- a/tests/test_intersphinx.py +++ b/tests/test_intersphinx.py @@ -81,7 +81,7 @@ def test_read_inventory_v2(): '/util/glossary.html#term-a-term' -@with_app(confoverrides={'extensions': 'sphinx.ext.intersphinx'}) +@with_app() @with_tempdir def test_missing_reference(tempdir, app): inv_file = tempdir / 'inventory' @@ -157,7 +157,7 @@ def test_missing_reference(tempdir, app): assert contnode[0].astext() == 'py3k:unknown' -@with_app(confoverrides={'extensions': 'sphinx.ext.intersphinx'}) +@with_app() @with_tempdir def test_load_mappings_warnings(tempdir, app): """ diff --git a/tests/test_quickstart.py b/tests/test_quickstart.py index 9daa7401..7323f48e 100644 --- a/tests/test_quickstart.py +++ b/tests/test_quickstart.py @@ -170,6 +170,7 @@ def test_quickstart_all_answers(tempdir): 'Author name': u'Wolfgang Schäuble & G\'Beckstein'.encode('utf-8'), 'Project version': '2.0', 'Project release': '2.0.1', + 'Project language': 'de', 'Source file suffix': '.txt', 'Name of your master document': 'contents', 'autodoc': 'y', |
