mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #3351: intersphinx does not refers context
This commit is contained in:
@@ -145,6 +145,18 @@ def test_missing_reference(tempdir, app, status, warning):
|
||||
assert rn is None
|
||||
assert contnode[0].astext() == 'py3k:unknown'
|
||||
|
||||
# no context data
|
||||
kwargs = {}
|
||||
node, contnode = fake_node('py', 'func', 'func', 'func()', **kwargs)
|
||||
rn = missing_reference(app, app.env, node, contnode)
|
||||
assert rn is None
|
||||
|
||||
# context data (like py:module) help to search objects
|
||||
kwargs = {'py:module': 'module1'}
|
||||
node, contnode = fake_node('py', 'func', 'func', 'func()', **kwargs)
|
||||
rn = missing_reference(app, app.env, node, contnode)
|
||||
assert rn[0].astext() == 'func()'
|
||||
|
||||
# check relative paths
|
||||
rn = reference_check('py', 'mod', 'py3krel:module1', 'foo')
|
||||
assert rn['refuri'] == 'py3k/foo.html#module-module1'
|
||||
|
||||
Reference in New Issue
Block a user