gawel / pyquery

A jquery-like library for python
http://pyquery.rtfd.org/
Other
2.29k stars 182 forks source link

test fails with libxml2-2.10.4 #248

Closed vcunat closed 5 months ago

vcunat commented 1 year ago

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 ==================
mgorny commented 1 year ago

Ping.

frenzymadness commented 5 months ago

We have the same issue in Fedora Linux.

gawel commented 5 months ago

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)

gawel commented 5 months ago

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