summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Fernandez <matthew.fernandez@gmail.com>2017-11-05 13:48:43 -0800
committerMatthew Fernandez <matthew.fernandez@gmail.com>2017-11-26 20:54:32 -0800
commit1b664248f4ed5e00f89574bd6568e86b29a9df0f (patch)
treec10328408754c462ceba7937769d8d9c4cbe5de8
parentfd94702eedca9ce443f96fda1a9969ed54e81c54 (diff)
downloadsphinx-git-1b664248f4ed5e00f89574bd6568e86b29a9df0f.tar.gz
update todo extension test to test multiple todolists
This tests for regression of previous bug #4214: Two todolist directives break sphinx-1.6.5.
-rw-r--r--tests/roots/test-ext-todo/index.rst2
-rw-r--r--tests/test_ext_todo.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/roots/test-ext-todo/index.rst b/tests/roots/test-ext-todo/index.rst
index 6b95f73fd..781473d6a 100644
--- a/tests/roots/test-ext-todo/index.rst
+++ b/tests/roots/test-ext-todo/index.rst
@@ -7,3 +7,5 @@ test for sphinx.ext.todo
bar
.. todolist::
+
+.. todolist::
diff --git a/tests/test_ext_todo.py b/tests/test_ext_todo.py
index 6a4789928..cee59fe9d 100644
--- a/tests/test_ext_todo.py
+++ b/tests/test_ext_todo.py
@@ -99,11 +99,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.