diff options
| author | Georg Brandl <georg@python.org> | 2010-05-23 13:06:01 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-05-23 13:06:01 +0200 |
| commit | 569ab21949cd3fc97f351e5e668303dd80c14680 (patch) | |
| tree | 989051f4197d5e59043b4cf1e89ca49ca707c505 /tests/test_intersphinx.py | |
| parent | 9b0db8938b61ed1f4f0bceaa6d012ed2a79c09ff (diff) | |
| download | sphinx-569ab21949cd3fc97f351e5e668303dd80c14680.tar.gz | |
#413: Added a way for intersphinx to refer to named labels in other
projects, and to specify the project you want to link to.
Diffstat (limited to 'tests/test_intersphinx.py')
| -rw-r--r-- | tests/test_intersphinx.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/test_intersphinx.py b/tests/test_intersphinx.py index 5263d724..622243e6 100644 --- a/tests/test_intersphinx.py +++ b/tests/test_intersphinx.py @@ -36,10 +36,10 @@ inventory_v2 = '''\ # Version: 2.0 # The remainder of this file is compressed with zlib. ''' + zlib.compress('''\ -module1 py:module 0 foo.html#module-module1 -module2 py:module 0 foo.html#module-$ -module1.func py:function 1 sub/foo.html#$ -CFunc c:function 2 cfunc.html#CFunc +module1 py:module 0 foo.html#module-module1 Long Module desc +module2 py:module 0 foo.html#module-$ - +module1.func py:function 1 sub/foo.html#$ - +CFunc c:function 2 cfunc.html#CFunc - ''') @@ -48,9 +48,9 @@ def test_read_inventory_v1(): f.readline() invdata = read_inventory_v1(f, '/util', posixpath.join) assert invdata['py:module']['module'] == \ - ('foo', '1.0', '/util/foo.html#module-module') + ('foo', '1.0', '/util/foo.html#module-module', '-') assert invdata['py:class']['module.cls'] == \ - ('foo', '1.0', '/util/foo.html#module.cls') + ('foo', '1.0', '/util/foo.html#module.cls', '-') def test_read_inventory_v2(): @@ -67,9 +67,9 @@ def test_read_inventory_v2(): assert len(invdata1['py:module']) == 2 assert invdata1['py:module']['module1'] == \ - ('foo', '2.0', '/util/foo.html#module-module1') + ('foo', '2.0', '/util/foo.html#module-module1', 'Long Module desc') assert invdata1['py:module']['module2'] == \ - ('foo', '2.0', '/util/foo.html#module-module2') + ('foo', '2.0', '/util/foo.html#module-module2', '-') assert invdata1['py:function']['module1.func'][2] == \ '/util/sub/foo.html#module1.func' assert invdata1['c:function']['CFunc'][2] == '/util/cfunc.html#CFunc' @@ -88,7 +88,7 @@ def test_missing_reference(tempdir, app): inv = app.env.intersphinx_inventory assert inv['py:module']['module2'] == \ - ('foo', '2.0', 'http://docs.python.org/foo.html#module-module2') + ('foo', '2.0', 'http://docs.python.org/foo.html#module-module2', '-') # create fake nodes and check referencing contnode = nodes.emphasis('foo') |
