-
Notifications
You must be signed in to change notification settings - Fork 182
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
1.4.3: test suite is failing #215
Comments
the last travis build passed but 3.8 was not included https://travis-ci.org/github/gawel/pyquery/builds/745042291 needs to switch to github actions and add 3.8 |
OK however do you have any guess what it may be? :) |
not at all. maybe it's not related to 3.8 but some changes in a third party library |
well, it's passing https://github.com/gawel/pyquery/runs/1971496711?check_suite_focus=true |
ok, pyquery still use nosetest... I guess the issue is related with pytest |
@kloczek is that a blocker for you? not sure I can find some times to switch to pytest soon. Can be tricky because doctest uses nose fixtures |
No it is not. |
tests now use pytest. if you want to give it a try. |
Just tested with 1.4.3 + git patches and test suite still is failing:
|
BTW: docs/conf.py is with exec attribute |
can you test with master ? this should have been fixed already |
If you will look closer you may see that I've applied on top 1.4.3 all commits except those which are related to CI/travis and still test suite is failing. |
yeah... those errors are super weird. I don't understand how you get those extra closing tags included. |
Is it anything what I ican do to try to diagnose that?🤔 |
Here is my output using tox (I dont have the same exact python version):
You can check your pip freeze to see if you got any differences You can try using tox to see if you get the same errors (with your python versions/distro) |
In Fedora, this seems to be caused by the difference between libxml2 2.9.10 and 2.9.12. |
Looks like lxml is using 2.9.10 in the build process:
https://github.com/lxml/lxml/runs/2618555701?check_suite_focus=true |
And 2.9.12 was released only 6 days ago (and don't seems to introduce major changes). Not sure it's the problem |
Can this be closed? If not, what is the TODO? |
I don't think that this was ever fixed. The TODO would probably be to fix the tests, no? |
GitHub Actions and tox run the pytests successfully 15 times on every pull request. |
With libxml2 2.9.12? |
Not sure. I guess it use a wheel with libxml2 included. Don't know which version |
libxml2 v2.10.3 is the current release... https://gitlab.gnome.org/GNOME/libxml2/-/releases |
nope :) we are talking about libxml2, not lxml. libxml2 2.10.0 is mentioned in the CHANGES. looks like it fix a bug with 2.9.1. So maybe the bug is still in 2.9.12 ? |
Just tested 2.0.0 and looks like now pytest is failing in one unit + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pyquery-2.0.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pyquery-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.2.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pyquery-2.0.0
configfile: pytest.ini
collected 151 items
README.rst . [ 0%]
docs/attributes.rst . [ 1%]
docs/css.rst . [ 1%]
docs/manipulating.rst . [ 2%]
docs/pseudo_classes.rst . [ 3%]
docs/scrap.rst . [ 3%]
docs/tips.rst . [ 4%]
docs/traversing.rst . [ 5%]
pyquery/cssselectpatch.py ........................... [ 23%]
pyquery/pyquery.py ........................................ [ 49%]
tests/doctests.rst . [ 50%]
tests/test_browser.py ..... [ 53%]
tests/test_pyquery.py .................................................. [ 86%]
...........F........ [100%]
=================================== 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 - Assertio...
======================== 1 failed, 150 passed in 7.15s ========================= |
The text was updated successfully, but these errors were encountered: