summaryrefslogtreecommitdiff
path: root/tests/test_ext_todo.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_ext_todo.py')
-rw-r--r--tests/test_ext_todo.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/test_ext_todo.py b/tests/test_ext_todo.py
index e5aff7598..5e7ade9f6 100644
--- a/tests/test_ext_todo.py
+++ b/tests/test_ext_todo.py
@@ -40,13 +40,19 @@ def test_todo(app, status, warning):
'<p class="last">todo in foo</p>')
assert re.search(html, content, re.S)
+ html = ('<p class="first admonition-title">Todo</p>\n'
+ '<p class="last">todo in param field</p>')
+ assert re.search(html, content, re.S)
+
# check emitted warnings
assert 'WARNING: TODO entry found: todo in foo' in warning.getvalue()
assert 'WARNING: TODO entry found: todo in bar' in warning.getvalue()
# check handled event
- assert len(todos) == 2
- assert set(todo[1].astext() for todo in todos) == set(['todo in foo', 'todo in bar'])
+ assert len(todos) == 3
+ assert set(todo[1].astext() for todo in todos) == {'todo in foo',
+ 'todo in bar',
+ 'todo in param field'}
@pytest.mark.sphinx('html', testroot='ext-todo', freshenv=True,
@@ -81,8 +87,10 @@ def test_todo_not_included(app, status, warning):
assert 'WARNING: TODO entry found: todo in bar' in warning.getvalue()
# check handled event
- assert len(todos) == 2
- assert set(todo[1].astext() for todo in todos) == set(['todo in foo', 'todo in bar'])
+ assert len(todos) == 3
+ assert set(todo[1].astext() for todo in todos) == {'todo in foo',
+ 'todo in bar',
+ 'todo in param field'}
@pytest.mark.sphinx('latex', testroot='ext-todo', freshenv=True,
@@ -105,7 +113,7 @@ def test_todo_valid_link(app, status, warning):
link = r'\{\\hyperref\[\\detokenize\{(.*?foo.*?)}]\{\\sphinxcrossref{' \
r'\\sphinxstyleemphasis{original entry}}}}'
m = re.findall(link, content)
- assert len(m) == 2
+ assert len(m) == 4
target = m[0]
# Look for the targets of this link.