pyquery
pyquery copied to clipboard
test fails with libxml2-2.10.4
Due to behavior changed in https://gitlab.gnome.org/GNOME/libxml2/-/commit/73210eeda5782da3414517cab20550d137e2dd25
=================================== FAILURES ===================================
_____________________ TestXMLNamespace.test_selector_html ______________________
self = <tests.test_pyquery.TestXMLNamespace testMethod=test_selector_html>
def test_selector_html(self):
expected = 'What'
d = pq('blah', self.xml.split('?>', 1)[1], parser='html')
val = d.text()
> self.assertEqual(repr(val), repr(expected))
E AssertionError: "''" != "'What'"
E - ''
E + 'What'
tests/test_pyquery.py:862: AssertionError
=========================== short test summary info ============================
FAILED tests/test_pyquery.py::TestXMLNamespace::test_selector_html - AssertionError: "''" != "'What'"
================= 1 failed, 149 passed, 1 deselected in 6.73s ==================
Ping.
We have the same issue in Fedora Linux.
I'm not sure it's the same issue but test are finally failing on gha (I wasn't able to reproduce the problem before that)
I ended up removing the test... I think it's no longer possible to use the html parser with an xmlfile
see https://github.com/gawel/pyquery/commit/b0cc1275565afe0d72e3796ccf84875af5e5463c