summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-02-12 09:33:42 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-04-03 23:54:19 +0900
commita6d9b24a3bf14bb22e33283abc3ce60eb16dc6df (patch)
tree7a89a51e462c80ac0ecf1c56fa5287fd3e6c9f04
parent84b9d49826769c7d36f0399ee01777fd5bb8a209 (diff)
downloadsphinx-git-a6d9b24a3bf14bb22e33283abc3ce60eb16dc6df.tar.gz
test: Update testcase for docutils-0.17 (toctree caption)
Since v0.17, docutils starts to use <figcaption> for caption on HTML output. This modifies the expected value of our testcases to support it.
-rw-r--r--tests/test_intl.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_intl.py b/tests/test_intl.py
index 0e4387025..3a704fd7d 100644
--- a/tests/test_intl.py
+++ b/tests/test_intl.py
@@ -622,8 +622,11 @@ def test_html_meta(app):
assert expected_expr in result
expected_expr = '<meta content="I18N, SPHINX, MARKUP" name="keywords" />'
assert expected_expr in result
- expected_expr = '<p class="caption"><span class="caption-text">HIDDEN TOC</span></p>'
- assert expected_expr in result
+ if docutils.__version_info__ < (0, 17):
+ expected_expr = '<p class="caption"><span class="caption-text">HIDDEN TOC</span></p>'
+ assert expected_expr in result
+ else:
+ expected_expr = '<p><span class="caption-text">HIDDEN TOC</span></p>'
@sphinx_intl