diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-04-10 00:32:26 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-10 00:32:26 +0900 |
commit | fe6d95e4294f47d61f1a04a1f8c6567c9802f504 (patch) | |
tree | 33a7143bf1dcf60830c2e1fcd4b396175af45e64 /tests/test_intl.py | |
parent | 7327e56dff865d4766c43d46405ae827e10fd6c3 (diff) | |
parent | ce5d66e618c111b115a9bb7b1401a26483fcfa8f (diff) | |
download | sphinx-git-fe6d95e4294f47d61f1a04a1f8c6567c9802f504.tar.gz |
Merge branch 'master' into patch-1
Diffstat (limited to 'tests/test_intl.py')
-rw-r--r-- | tests/test_intl.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/tests/test_intl.py b/tests/test_intl.py index 3a704fd7d..bb493c2f3 100644 --- a/tests/test_intl.py +++ b/tests/test_intl.py @@ -336,9 +336,9 @@ def test_text_figure_captions(app): "14.2. IMAGE URL AND ALT\n" "=======================\n" "\n" - "[image: i18n][image]\n" + "[image: I18N -> IMG][image]\n" "\n" - " [image: img][image]\n" + " [image: IMG -> I18N][image]\n" "\n" "\n" "14.3. IMAGE ON SUBSTITUTION\n" @@ -622,11 +622,8 @@ def test_html_meta(app): assert expected_expr in result expected_expr = '<meta content="I18N, SPHINX, MARKUP" name="keywords" />' 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>' + expected_expr = '<p class="caption"><span class="caption-text">HIDDEN TOC</span></p>' + assert expected_expr in result @sphinx_intl @@ -1098,12 +1095,12 @@ def test_additional_targets_should_not_be_translated(app): result = (app.outdir / 'figure.html').read_text() - # alt and src for image block should not be translated - expected_expr = """<img alt="i18n" src="_images/i18n.png" />""" + # src for image block should not be translated (alt is translated) + expected_expr = """<img alt="I18N -> IMG" src="_images/i18n.png" />""" assert_count(expected_expr, result, 1) - # alt and src for figure block should not be translated - expected_expr = """<img alt="img" src="_images/img.png" />""" + # src for figure block should not be translated (alt is translated) + expected_expr = """<img alt="IMG -> I18N" src="_images/img.png" />""" assert_count(expected_expr, result, 1) |