-
Notifications
You must be signed in to change notification settings - Fork 325
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
base: develop
Are you sure you want to change the base?
Skip broken HTML preview test case with libxml >= 2.14 #18413
Conversation
12ba8b2
to
5897fd6
Compare
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: element-hq#18406 Signed-off-by: Pascal Ernster <[email protected]>
5897fd6
to
4926c90
Compare
@@ -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.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raise SkipTest("This test is known to be broken with lixml >= 2.14.") | |
raise SkipTest("This test is known to be broken with libxml >= 2.14.") |
@@ -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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What versions specifically is this broken and fixed in?
These tests seem to pass fine for me locally with libxml2 2.14.3-1
on Manjaro Linux (Arch-based).
$ SYNAPSE_TEST_LOG_LEVEL=INFO poetry run trial tests.media.test_html_preview
The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead.
tests.media.test_html_preview
MediaEncodingTestCase
test_content_type ... [OK]
test_duplicates ... [OK]
test_fallback ... [OK]
test_meta_charset ... [OK]
test_meta_charset_underscores ... [OK]
test_meta_xml_encoding ... [OK]
test_unknown_invalid ... [OK]
test_xml_encoding ... [OK]
OpenGraphFromHtmlTestCase
test_comment ... [OK]
test_comment2 ... [OK]
test_empty ... [OK]
test_empty_description ... [OK]
test_h1_as_title ... [OK]
test_invalid_encoding ... [OK]
test_invalid_encoding2 ... [OK]
test_missing_title ... [OK]
test_missing_title_and_broken_h1 ... [OK]
test_nested_nodes ... [OK]
test_no_tree ... [OK]
test_script ... [OK]
test_simple ... [OK]
test_twitter_tag ... [OK]
test_windows_1252 ... [OK]
test_xml ... [OK]
SummarizeTestCase
test_long_summarize ... [OK]
test_short_summarize ... [OK]
test_small_then_large_summarize ... [OK]
-------------------------------------------------------------------------------
Ran 27 tests in 0.025s
PASSED (successes=27)
I don't see the specific fix commit mentioned in the issue in the diff for the latest tag, https://gitlab.gnome.org/GNOME/libxml2/-/compare/v2.14.2...v2.14.3?from_project_id=1665 so I'm confused why it's working for me.
We may want to adjust this condition depending on the answer here.
@@ -0,0 +1 @@ | |||
Skip broken HTML preview test case with libxml >= 2.14. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue (#18406) mentions that this isn't reproducible with [email protected]
. Could another alternative fix just be to update that dependency instead? -> #18480
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