diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-12-31 21:05:38 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-31 21:05:38 +0900 |
commit | fce7f38b7170549400eada8f7afd8ae5e443348e (patch) | |
tree | 5e7b9714b84288b1ca04438b73611a78aa4c23df /tests/test_ext_todo.py | |
parent | 0059c05a857f4144e4eea8b3d2908e906cf7de49 (diff) | |
parent | 1cae50f74833fc3506ebee19462e0a1457638352 (diff) | |
download | sphinx-git-fce7f38b7170549400eada8f7afd8ae5e443348e.tar.gz |
Merge pull request #4217 from Smattr/4a164170-33e9-4df3-aad2-a13af37b6b43
Fix #4214: Two todolist directives break sphinx-1.6.5
Diffstat (limited to 'tests/test_ext_todo.py')
-rw-r--r-- | tests/test_ext_todo.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_ext_todo.py b/tests/test_ext_todo.py index 4f01a07ab..cee59fe9d 100644 --- a/tests/test_ext_todo.py +++ b/tests/test_ext_todo.py @@ -86,7 +86,7 @@ def test_todo_not_included(app, status, warning): assert set(todo[1].astext() for todo in todos) == set(['todo in foo', 'todo in bar']) @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 @@ -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. |