summaryrefslogtreecommitdiff
path: root/tests/test_ext_todo.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2017-12-31 21:13:34 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2017-12-31 21:13:34 +0900
commite8402bf0ee1925012f10687838551e7b4b1068b0 (patch)
tree9601cedd04e5f0a40ef76718e10e4c94788a4968 /tests/test_ext_todo.py
parent40186077d7e05ff6aa61d290b3bc1a844bdd8667 (diff)
parentfce7f38b7170549400eada8f7afd8ae5e443348e (diff)
downloadsphinx-git-e8402bf0ee1925012f10687838551e7b4b1068b0.tar.gz
Merge branch 'stable'
Diffstat (limited to 'tests/test_ext_todo.py')
-rw-r--r--tests/test_ext_todo.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_ext_todo.py b/tests/test_ext_todo.py
index 19225bea8..c0d88a0e0 100644
--- a/tests/test_ext_todo.py
+++ b/tests/test_ext_todo.py
@@ -87,7 +87,7 @@ def test_todo_not_included(app, status, warning):
@pytest.mark.sphinx('latex', testroot='ext-todo', freshenv=True,
- confoverrides={'todo_include_todos': True, 'todo_emit_warnings': True})
+ confoverrides={'todo_include_todos': True})
def test_todo_valid_link(app, status, warning):
"""
Test that the inserted "original entry" links for todo items have a target
@@ -100,11 +100,13 @@ def test_todo_valid_link(app, status, warning):
content = (app.outdir / 'TodoTests.tex').text()
- # Look for the link to foo. We could equally well look for the link to bar.
+ # Look for the link to foo. Note that there are two of them because the
+ # source document uses todolist twice. We could equally well look for links
+ # to bar.
link = r'\{\\hyperref\[\\detokenize\{(.*?foo.*?)}]\{\\sphinxcrossref{' \
r'\\sphinxstyleemphasis{original entry}}}}'
m = re.findall(link, content)
- assert len(m) == 1
+ assert len(m) == 2
target = m[0]
# Look for the targets of this link.