From f8fc9a672ecc6c114d1653e2b96fa1b33a7b9167 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:33:14 +0200 Subject: [PATCH] fix: test nested blocks with what CI installs The rendering test imported pymdownx, which the CI test job does not install. An admonition nests its body by the same four spaces, so the test uses it and needs only markdown. --- tests/test_site_exports.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/test_site_exports.py b/tests/test_site_exports.py index 441fefc2..3c44f936 100644 --- a/tests/test_site_exports.py +++ b/tests/test_site_exports.py @@ -843,16 +843,15 @@ class NestedProfileBlocksRenderAsLists(unittest.TestCase): def _html(self, value: object) -> str: try: import markdown - import pymdownx.details # noqa: F401 except ImportError: - self.skipTest("markdown and pymdown-extensions are not installed") + self.skipTest("markdown is not installed") from siterender import _render_yaml_value - lines = ['???+ abstract "Analysis"', ""] + # The page opens the block with ???+ (pymdownx.details). An admonition + # nests its body by the same four spaces, and needs nothing CI lacks. + lines = ['!!! abstract "Analysis"', ""] _render_yaml_value(lines, value, 4) - return markdown.markdown( - "\n".join(lines), extensions=["admonition", "pymdownx.details"] - ) + return markdown.markdown("\n".join(lines), extensions=["admonition"]) def test_a_nested_mapping_is_a_nested_list(self): html = self._html({"megacd_bios": {"external_required": False, "source_ref": "a.c:1"},