diff options
| author | 2024-04-23 00:38:24 -0400 | |
|---|---|---|
| committer | 2024-04-23 00:38:24 -0400 | |
| commit | 0199f695e93782d728bd31857afe54f4df92f351 (patch) | |
| tree | 34e9030a05a89461d222172615c74891fba1e5ef /tests/test_compile_markdown.py | |
| parent | 22b8f5dae59e876643e8e3002f72282f3e8608c5 (diff) | |
| parent | 9b0e86a8e74768c4fe848fb5ce8d754292db4e3e (diff) | |
Update upstream source from tag 'upstream/8.3.0'
Update to upstream version '8.3.0'
with Debian dir bc13791b86ab63e4473e92288f1749c55a6ad540
Diffstat (limited to 'tests/test_compile_markdown.py')
| -rw-r--r-- | tests/test_compile_markdown.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_compile_markdown.py b/tests/test_compile_markdown.py index a902347..eb28e3e 100644 --- a/tests/test_compile_markdown.py +++ b/tests/test_compile_markdown.py @@ -1,4 +1,5 @@ import io +import sys from os import path import pytest @@ -8,13 +9,17 @@ from nikola.plugins.compile.markdown import CompileMarkdown from .helper import FakeSite +# The <source> tag should not have a closing tag, but it wasn't included in xml.etree.ElementTree.HTML_EMPTY before Python 3.11 +SOURCE_CLOSE_TAG = '</source>' if sys.version_info < (3, 11) else '' + + @pytest.mark.parametrize( "input_str, expected_output", [ pytest.param("", "", id="empty"), pytest.param( "[podcast]https://archive.org/download/Rebeldes_Stereotipos/rs20120609_1.mp3[/podcast]", - '<p><audio controls=""><source src="https://archive.org/download/Rebeldes_Stereotipos/rs20120609_1.mp3" type="audio/mpeg"></source></audio></p>', + '<p><audio controls=""><source src="https://archive.org/download/Rebeldes_Stereotipos/rs20120609_1.mp3" type="audio/mpeg">' + SOURCE_CLOSE_TAG + '</audio></p>', id="mdx podcast", ), pytest.param( |
