Issue #62 resolved

Test failures

Arfrever Frehtes Taifersar Arahesis
created an issue

Currently some tests fail for me. Maybe due to upgrade of some dependencies. I use cssselect-0.7.1, lxml-3.0alpha2, WebOb-1.2.2. The same errors/failures occur with all versions of CPython.

{{{ $ nosetests-2.7 nose.config: INFO: Ignoring files matching ['^\.', '^', '^setup\.py$'] nose.selector: INFO: /tmp/pyquery/bootstrap-py3k.py is executable; skipped nose.selector: INFO: /tmp/pyquery/bootstrap.py is executable; skipped Doctest: pyquery.pyquery.PyQuery.Fn ... ok Doctest: pyquery.pyquery.PyQuery.html ... ok Doctest: pyquery.pyquery.PyQuery.str ... ok Doctest: pyquery.pyquery.PyQuery.addClass ... ok Doctest: pyquery.pyquery.PyQuery.children ... ok Doctest: pyquery.pyquery.PyQuery.closest ... ok Doctest: pyquery.pyquery.PyQuery.end ... ok Doctest: pyquery.pyquery.PyQuery.eq ... ok Doctest: pyquery.pyquery.PyQuery.filter ... ok Doctest: pyquery.pyquery.PyQuery.find ... ok Doctest: pyquery.pyquery.PyQuery.hasClass ... ok Doctest: pyquery.pyquery.PyQuery.hide ... ok Doctest: pyquery.pyquery.PyQuery.html ... ok Doctest: pyquery.pyquery.PyQuery.is ... ok Doctest: pyquery.pyquery.PyQuery.map ... ok Doctest: pyquery.pyquery.PyQuery.nextAll ... ok Doctest: pyquery.pyquery.PyQuery.not_ ... ok Doctest: pyquery.pyquery.PyQuery.outerHtml ... ok Doctest: pyquery.pyquery.PyQuery.parents ... ok Doctest: pyquery.pyquery.PyQuery.prevAll ... ok Doctest: pyquery.pyquery.PyQuery.remove ... ok Doctest: pyquery.pyquery.PyQuery.removeAttr ... ok Doctest: pyquery.pyquery.PyQuery.removeClass ... ok Doctest: pyquery.pyquery.PyQuery.show ... ok Doctest: pyquery.pyquery.PyQuery.siblings ... ok Doctest: pyquery.pyquery.PyQuery.text ... ok Doctest: pyquery.pyquery.PyQuery.toggleClass ... ok Doctest: pyquery.pyquery.PyQuery.val ... ok Doctest: pyquery.pyquery.PyQuery.wrap ... ok Doctest: pyquery.pyquery.PyQuery.wrapAll ... ok Doctest: ... ok test_class (pyquery.test.TestAjaxSelector) ... ok test_get (pyquery.test.TestAjaxSelector) ... ok test_get_root (pyquery.test.TestAjaxSelector) ... ok test_on_the_fly_dom_creation (pyquery.test.TestAjaxSelector) ... ok test_post (pyquery.test.TestAjaxSelector) ... ok test_proxy (pyquery.test.TestAjaxSelector) ... ok test_pseudo_classes (pyquery.test.TestAjaxSelector) ... ERROR test_secure_get (pyquery.test.TestAjaxSelector) ... ok test_secure_get_not_authorized (pyquery.test.TestAjaxSelector) ... ok test_selector_from_doc (pyquery.test.TestAjaxSelector) ... ok test_selector_from_html (pyquery.test.TestAjaxSelector) ... ok test_selector_from_html_from_obj (pyquery.test.TestAjaxSelector) ... ok test_selector_from_obj (pyquery.test.TestAjaxSelector) ... ok test_subquery (pyquery.test.TestAjaxSelector) ... ok Doctest: ... ok test_html_upper_element_name (pyquery.test.TestAttributeCase) ... ok test_xml_upper_element_name (pyquery.test.TestAttributeCase) ... ok Doctest: ... ok test_S_this_inside_callback (pyquery.test.TestCallback) ... ok test_parameterless_callback (pyquery.test.TestCallback) ... ok Doctest: ... ok Doctest: ... ok Doctest: ... ok test_parser_persistance (pyquery.test.TestHTMLParser) ... ok test_replaceWith (pyquery.test.TestHTMLParser) ... ok test_replaceWith_with_function (pyquery.test.TestHTMLParser) ... ok test_soup_parser (pyquery.test.TestHTMLParser) ... ok Doctest: ... ok test_remove (pyquery.test.TestManipulating) ... ok test_custom_opener (pyquery.test.TestOpener) ... ok Doctest: ... ok test_class (pyquery.test.TestSelector) ... ok test_get_root (pyquery.test.TestSelector) ... ok test_on_the_fly_dom_creation (pyquery.test.TestSelector) ... ok test_pseudo_classes (pyquery.test.TestSelector) ... ERROR test_selector_from_doc (pyquery.test.TestSelector) ... ok test_selector_from_html (pyquery.test.TestSelector) ... ok test_selector_from_html_from_obj (pyquery.test.TestSelector) ... ok test_selector_from_obj (pyquery.test.TestSelector) ... ok Doctest: ... ok Doctest: ... ok Doctest: ... ok test_closest (pyquery.test.TestTraversal) ... ok test_each (pyquery.test.TestTraversal) ... ok test_end (pyquery.test.TestTraversal) ... ok test_filter (pyquery.test.TestTraversal) ... ok test_find (pyquery.test.TestTraversal) ... ok test_is (pyquery.test.TestTraversal) ... ok test_map (pyquery.test.TestTraversal) ... ok test_not (pyquery.test.TestTraversal) ... ok Doctest: ... ok test_unicode (pyquery.test.TestUnicode) ... ok test_get (pyquery.test.TestWebScrapping) ... FAIL test_selector (pyquery.test.TestXMLNamespace) ... ok test_selector_html (pyquery.test.TestXMLNamespace) ... ok test_selector_with_xml (pyquery.test.TestXMLNamespace) ... ok

====================================================================== ERROR: test_pseudo_classes (pyquery.test.TestAjaxSelector)


Traceback (most recent call last): File "/tmp/pyquery/pyquery/test.py", line 242, in test_pseudo_classes self.assertEqual(e('div:gt(0)').text(), 'node2 node3') File "/tmp/pyquery/pyquery/pyquery.py", line 247, in call result = self.class(*args, parent=self, kwargs) File "/tmp/pyquery/pyquery/ajax.py", line 26, in __init__ Base.__init__(self, *args, kwargs) File "/tmp/pyquery/pyquery/pyquery.py", line 221, in init xpath = self._css_to_xpath(selector) File "/tmp/pyquery/pyquery/pyquery.py", line 233, in _css_to_xpath return self._translator.css_to_xpath(selector, prefix) File "/usr/lib64/python2.7/site-packages/cssselect/xpath.py", line 172, in css_to_xpath for selector in selectors) File "/usr/lib64/python2.7/site-packages/cssselect/xpath.py", line 172, in <genexpr> for selector in selectors) File "/usr/lib64/python2.7/site-packages/cssselect/xpath.py", line 192, in selector_to_xpath xpath = self.xpath(tree) File "/usr/lib64/python2.7/site-packages/cssselect/xpath.py", line 214, in xpath return method(parsed_selector) File "/usr/lib64/python2.7/site-packages/cssselect/xpath.py", line 242, in xpath_function return method(self.xpath(function.selector), function) File "/tmp/pyquery/pyquery/cssselectpatch.py", line 158, in xpath_gt_function 'position() > %s' % (int(function.arguments) + 1)) TypeError: int() argument must be a string or a number, not 'list'

====================================================================== ERROR: test_pseudo_classes (pyquery.test.TestSelector)


Traceback (most recent call last): File "/tmp/pyquery/pyquery/test.py", line 242, in test_pseudo_classes self.assertEqual(e('div:gt(0)').text(), 'node2 node3') File "/tmp/pyquery/pyquery/pyquery.py", line 247, in call result = self.class(args, parent=self, *kwargs) File "/tmp/pyquery/pyquery/pyquery.py", line 221, in init xpath = self._css_to_xpath(selector) File "/tmp/pyquery/pyquery/pyquery.py", line 233, in _css_to_xpath return self._translator.css_to_xpath(selector, prefix) File "/usr/lib64/python2.7/site-packages/cssselect/xpath.py", line 172, in css_to_xpath for selector in selectors) File "/usr/lib64/python2.7/site-packages/cssselect/xpath.py", line 172, in <genexpr> for selector in selectors) File "/usr/lib64/python2.7/site-packages/cssselect/xpath.py", line 192, in selector_to_xpath xpath = self.xpath(tree) File "/usr/lib64/python2.7/site-packages/cssselect/xpath.py", line 214, in xpath return method(parsed_selector) File "/usr/lib64/python2.7/site-packages/cssselect/xpath.py", line 242, in xpath_function return method(self.xpath(function.selector), function) File "/tmp/pyquery/pyquery/cssselectpatch.py", line 158, in xpath_gt_function 'position() > %s' % (int(function.arguments) + 1)) TypeError: int() argument must be a string or a number, not 'list'

====================================================================== FAIL: test_get (pyquery.test.TestWebScrapping)


Traceback (most recent call last): File "/tmp/pyquery/pyquery/test.py", line 490, in test_get self.assertEqual(d('.news-in-brief h3').text(), 'Slight Inconsistency Found In Bible') AssertionError: 'Slight Inconsistency Found In Bible Pep-Rally Skit Rumored To Involve Cross-Dressing Principal' != 'Slight Inconsistency Found In Bible'


Ran 87 tests in 3.173s

FAILED (errors=2, failures=1) }}}