Fix links to external option docs with intersphinx (refs: #3769)

This commit is contained in:
Takeshi KOMIYA
2018-01-01 23:29:10 +09:00
parent f21fe6f24f
commit 850e9a9c5c
4 changed files with 20 additions and 6 deletions

View File

@@ -194,7 +194,7 @@ def test_missing_reference_stddomain(tempdir, app, status, warning):
inv_file = tempdir / 'inventory'
inv_file.write_bytes(inventory_v2)
app.config.intersphinx_mapping = {
'https://docs.python.org/': inv_file,
'cmd': ('https://docs.python.org/', inv_file),
}
app.config.intersphinx_cache_limit = 0
@@ -213,6 +213,12 @@ def test_missing_reference_stddomain(tempdir, app, status, warning):
rn = missing_reference(app, app.env, node, contnode)
assert rn.astext() == 'ls -l'
# refers inventory by name
kwargs = {}
node, contnode = fake_node('std', 'option', 'cmd:ls -l', '-l', **kwargs)
rn = missing_reference(app, app.env, node, contnode)
assert rn.astext() == '-l'
@pytest.mark.sphinx('html', testroot='ext-intersphinx-cppdomain')
def test_missing_reference_cppdomain(tempdir, app, status, warning):