Skip to content

Skip broken HTML preview test case with libxml >= 2.14 #18413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/18413.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Skip broken HTML preview test case with libxml >= 2.14.
5 changes: 5 additions & 0 deletions tests/media/test_html_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
)

from tests import unittest
from unittest.case import SkipTest

try:
import lxml
from lxml import etree
except ImportError:
lxml = None # type: ignore[assignment]

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

def test_no_tree(self) -> None:
"""A valid body with no tree in it."""
if etree.LIBXML_VERSION >= (2, 14):
raise SkipTest("This test is known to be broken with lixml >= 2.14.")

html = b"\x00"
tree = decode_body(html, "http://example.com/test.html")
self.assertIsNone(tree)
Expand Down