diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-11-05 02:21:47 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-11-05 02:21:47 +0900 |
commit | 8bf84167a30aa05886fcc1ed8895c8c20e939d89 (patch) | |
tree | 51252d17e9c5a344395d64fe4225759cb04f1f4c /tests/test_domain_py.py | |
parent | b93aa3137af650ea01f3a68bb14e822bffe81309 (diff) | |
parent | ab707be1e1def8c904b5df0c5ddeaf2edacca0f6 (diff) | |
download | sphinx-git-8bf84167a30aa05886fcc1ed8895c8c20e939d89.tar.gz |
Merge branch '3.x'
Diffstat (limited to 'tests/test_domain_py.py')
-rw-r--r-- | tests/test_domain_py.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_domain_py.py b/tests/test_domain_py.py index eb3afae1d..e9facc0e2 100644 --- a/tests/test_domain_py.py +++ b/tests/test_domain_py.py @@ -876,3 +876,11 @@ def test_noindexentry(app): assert_node(doctree, (addnodes.index, desc, addnodes.index, desc)) assert_node(doctree[0], addnodes.index, entries=[('single', 'f (built-in class)', 'f', '', None)]) assert_node(doctree[2], addnodes.index, entries=[]) + + +@pytest.mark.sphinx('dummy', testroot='domain-py-xref-warning') +def test_warn_missing_reference(app, status, warning): + app.build() + assert 'index.rst:6: WARNING: undefined label: no-label' in warning.getvalue() + assert ('index.rst:6: WARNING: Failed to create a cross reference. A title or caption not found: existing-label' + in warning.getvalue()) |