Skip to content

Commit 5897fd6

Browse files
committed
Skip broken HTML preview test case with libxml >= 2.14
The `test_no_tree` test case is known to fail with libxml >= 2.14, so skip it for the time being when libxml >= 2.14 is used. Reported-by: Ivan Shapovalov <[email protected]> Ref: https://gitlab.gnome.org/GNOME/libxml2/-/issues/908 Tested-by: Pascal Ernster <[email protected]> Closes: #18406 Signed-off-by: Pascal Ernster <[email protected]>
1 parent 1920dff commit 5897fd6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

changelog.d/18413.bugfix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Skip broken HTML preview test case with libxml >= 2.14.

tests/media/test_html_preview.py

+5
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@
2727
)
2828

2929
from tests import unittest
30+
from unittest.case import SkipTest
3031

3132
try:
3233
import lxml
34+
from lxml import etree
3335
except ImportError:
3436
lxml = None # type: ignore[assignment]
3537

@@ -324,6 +326,9 @@ def test_empty(self) -> None:
324326

325327
def test_no_tree(self) -> None:
326328
"""A valid body with no tree in it."""
329+
if etree.LIBXML_VERSION >= (2, 14):
330+
raise SkipTest("This test is known to be broken with lixml >= 2.14.")
331+
327332
html = b"\x00"
328333
tree = decode_body(html, "http://example.com/test.html")
329334
self.assertIsNone(tree)

0 commit comments

Comments
 (0)