summaryrefslogtreecommitdiff
path: root/tests/test_intl.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_intl.py')
-rw-r--r--tests/test_intl.py19
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 -&gt; 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 -&gt; I18N" src="_images/img.png" />"""
assert_count(expected_expr, result, 1)