diff options
| author | Georg Brandl <georg@python.org> | 2014-01-11 14:53:07 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2014-01-11 14:53:07 +0100 |
| commit | 27a523430e4758d994095ff32819afdfff88cfc8 (patch) | |
| tree | 73da62c89f34034606519b880ee852fca7148a73 /tests | |
| parent | afd5ef6d4d926c827bf28f09fbe89d4f02d4f6ae (diff) | |
| parent | 9cc21c5ad53f3d18609b631613945b6dbc9c8c39 (diff) | |
| download | sphinx-27a523430e4758d994095ff32819afdfff88cfc8.tar.gz | |
merge stable into default
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/root/includes.txt | 1 | ||||
| -rw-r--r-- | tests/root/objects.txt | 1 | ||||
| -rw-r--r-- | tests/test_config.py | 8 | ||||
| -rw-r--r-- | tests/test_intersphinx.py | 4 |
4 files changed, 9 insertions, 5 deletions
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..819c5dff 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 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): """ |
