SF.net SVN: docutils:[9640 ] trunk/docutils/test/test _writers/test_html5_polyglo t_parts.py
milde--- via Docutils-checkins <[email protected]>
| Newsgroups | gmane.text.docutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 9640
http://sourceforge.net/p/docutils/code/9640
Author: milde
Date: 2024-04-12 09:51:02 +0000 (Fri, 12 Apr 2024)
Log Message:
-----------
Remove duplicate test case.
Merge two dictionary items with the same name (`totest['no_system_messages']`).
Test embedded broken SVG with both, 'system_messages' and 'no_system_messages'.
Modified Paths:
--------------
trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
Modified: trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
===================================================================
--- trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2024-04-12 09:50:53 UTC (rev 9639)
+++ trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2024-04-12 09:51:02 UTC (rev 9640)
@@ -698,6 +698,24 @@
</aside>
""",
}],
+[f"""\
+.. image:: {DATA_ROOT}/circle-broken.svg
+ :loading: embed
+""",
+
+{'fragment': f"""\
+<svg xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 10 10">
+ <circle cx="5" cy="5" r="4" fill="lightblue" x/>
+</svg>
+
+<aside class="system-message">
+<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal"><string></span>, line 1)</p>
+<p>Cannot parse SVG image "{DATA_ROOT}/circle-broken.svg":
+ not well-formed (invalid token): line 3, column 48</p>
+</aside>
+"""
+}],
[r"""Broken :math:`\sin \my`.
""",
{'fragment': """\
@@ -730,60 +748,18 @@
</video>
""",
}],
-[r'Broken :math:`\sin \my`.',
-{'fragment': '<p>Broken <tt class="math">\\sin \\my</tt>.</p>\n'
-}],
[f"""\
.. image:: {DATA_ROOT}/circle-broken.svg
:loading: embed
""",
-{'fragment': f"""\
+{'fragment': """\
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 10 10">
<circle cx="5" cy="5" r="4" fill="lightblue" x/>
</svg>
-<aside class="system-message">
-<p class="system-message-title">System Message: ERROR/3 (<span class="docutils literal"><string></span>, line 1)</p>
-<p>Cannot parse SVG image "{DATA_ROOT}/circle-broken.svg":
- not well-formed (invalid token): line 3, column 48</p>
-</aside>
"""}],
-[r"""Broken :math:`\sin \my`.
-""",
-{'fragment': '<p>Broken <span class="problematic">\\sin \\my</span>.</p>\n'
- '<aside class="system-message">\n'
- '<p class="system-message-title">System Message: ERROR/3 (<span '
- 'class="docutils literal"><string></span>, line 1)</p>\n'
- '<p>Unknown TeX command "\\my".</p>\n'
- '<pre class="literal-block">\\sin \\my</pre>\n'
- '</aside>\n'
-}],
-])
-
-totest['no_system_messages'] = ({'stylesheet_path': '',
- 'embed_stylesheet': False,
- 'math_output': 'mathml',
- 'report_level': 4,
- 'warning_stream': '',
- }, [
-["""\
-.. image:: dummy.png
- :scale: 100%
- :loading: embed
-
-.. image:: dummy.mp4
- :scale: 100%
-""",
-{'fragment': '''\
-<img alt="dummy.png" src="dummy.png" />
-<video src="dummy.mp4" title="dummy.mp4">
-<a href="dummy.mp4">dummy.mp4</a>
-</video>
-''',
-}],
-[r"""Broken :math:`\sin \my`.
-""",
+[r'Broken :math:`\sin \my`.',
{'fragment': '<p>Broken <tt class="math">\\sin \\my</tt>.</p>\n'
}],
])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.