Hi! In an effort to update pyquery to the latest version in Fedora, I'm trying to get the test suite to fully pass with the following deps:
======================================================================
ERROR: test_pseudo_classes (pyquery.test.TestAjaxSelector)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/test.py", line 260, in test_pseudo_classes
self.assertEqual(e('div:first').text(), 'node1')
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 237, in __call__
result = self.__class__(*args, parent=self, **kwargs)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/ajax.py", line 26, in __init__
Base.__init__(self, *args, **kwargs)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 213, in __init__
xpath = self._css_to_xpath(selector)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 223, in _css_to_xpath
return self._translator.css_to_xpath(selector, prefix)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in css_to_xpath
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in <genexpr>
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 208, in selector_to_xpath
xpath = self.xpath(tree)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 230, in xpath
return method(parsed_selector)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 272, in xpath_pseudo
return method(self.xpath(pseudo.selector))
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/cssselectpatch.py", line 19, in xpath_first_pseudo
xpath.add_post_condition('position() = 1')
AttributeError: 'XPathExpr' object has no attribute 'add_post_condition'
======================================================================
ERROR: test_remove (pyquery.test.TestManipulating)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/test.py", line 453, in test_remove
val = d('a:first').html()
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 237, in __call__
result = self.__class__(*args, parent=self, **kwargs)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 213, in __init__
xpath = self._css_to_xpath(selector)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 223, in _css_to_xpath
return self._translator.css_to_xpath(selector, prefix)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in css_to_xpath
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in <genexpr>
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 208, in selector_to_xpath
xpath = self.xpath(tree)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 230, in xpath
return method(parsed_selector)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 272, in xpath_pseudo
return method(self.xpath(pseudo.selector))
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/cssselectpatch.py", line 19, in xpath_first_pseudo
xpath.add_post_condition('position() = 1')
AttributeError: 'XPathExpr' object has no attribute 'add_post_condition'
======================================================================
ERROR: test_pseudo_classes (pyquery.test.TestSelector)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/test.py", line 260, in test_pseudo_classes
self.assertEqual(e('div:first').text(), 'node1')
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 237, in __call__
result = self.__class__(*args, parent=self, **kwargs)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 213, in __init__
xpath = self._css_to_xpath(selector)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 223, in _css_to_xpath
return self._translator.css_to_xpath(selector, prefix)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in css_to_xpath
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in <genexpr>
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 208, in selector_to_xpath
xpath = self.xpath(tree)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 230, in xpath
return method(parsed_selector)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 272, in xpath_pseudo
return method(self.xpath(pseudo.selector))
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/cssselectpatch.py", line 19, in xpath_first_pseudo
xpath.add_post_condition('position() = 1')
AttributeError: 'XPathExpr' object has no attribute 'add_post_condition'
======================================================================
ERROR: test_get (pyquery.test.TestWebScrapping)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/test.py", line 568, in test_get
self.assertEqual(d('input[name=q]:last').val(), 'foo')
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 237, in __call__
result = self.__class__(*args, parent=self, **kwargs)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 213, in __init__
xpath = self._css_to_xpath(selector)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 223, in _css_to_xpath
return self._translator.css_to_xpath(selector, prefix)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in css_to_xpath
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in <genexpr>
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 208, in selector_to_xpath
xpath = self.xpath(tree)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 230, in xpath
return method(parsed_selector)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 272, in xpath_pseudo
return method(self.xpath(pseudo.selector))
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/cssselectpatch.py", line 25, in xpath_last_pseudo
xpath.add_post_condition('position() = last()')
AttributeError: 'XPathExpr' object has no attribute 'add_post_condition'
-------------------- >> begin captured stdout << ---------------------
<html><head><meta name="robots" content="noindex,nofollow"/><meta http-equiv="content-type" content="text/html; charset=UTF-8;charset=utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1"/><title>foo at DuckDuckGo</title><link rel="stylesheet" href="/s536.css" type="text/css"/><style id="DDG" type="text/css"/><link title="DuckDuckGo" type="application/opensearchdescription+xml" rel="search" href="/opensearch_ssl.xml"/><link rel="image_src" href="/assets/logo_homepage.normal.v101.png"/><link rel="apple-touch-icon" href="/assets/logo_icon128.v101.png"/><link rel="shortcut icon" href="/favicon.ico"/><script type="text/javascript">var fd,fq,it,iqa,iqm,iqs,iqq,qw,ra,rv,rad,r1hc,r1c,r2c,r3c,ric,rfq,rq,rds,rs,rt,y,y1,ti,tig,ka,kb,kc,kd,ke,kf,kg,kh,ki,kj,kk,kl,km,kn,ko,kp,kq,kr,ks,kt,ku,kv,kw,kx,ky,kz,k1,k2,k3,k4,k5,k6,k7,k8,k9,kaa,kab,kac,kad,kae,kaf,kag,kah,kai,kaj,kak,kal,kam,kan,kao,kap,kaq,kar,kas,kat,kau,kav,kaw,kax,kay,kaz,iqd,irp,locale;irp=1;fq=0;fd=1;it=0;iqa=0;iqm=0;iqs=0;iqq=0;qw=1;iqd=0;r1hc=0;r1c=0;r2c=4;r3c=0;ric=3;rq='foo';rqd="foo";rfq=0;rt='D';ra='';rv='';rad='';rds=30;rs=0;kl='';kp='';ks='';kw='';ka='';kt='';ky='';kk='';kf='';kc='';ke='';kr='';ko='';kj='';kz='';kg='';kh='';kd='';ki='';kn='';kb='';km='';ku='';kq='';kv='';kx='';k1='';k2='';k3='';k4='';k5='';k6='',k7='',k8='',k9='';kaa='';kab='';kac='';kad='';kae='';kaf='';kag='';kah='';kai='';kaj='';kak='';kal='';kam='';kan='';kao='';kap='';kaq='';kar='';kas='';kat='';kau='';kav='';kaw='';kax='';kay='';kaz='';spice_version='';locale='en_US';</script><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/><meta name="HandheldFriendly" content="true"/><meta name="apple-mobile-web-app-capable" content="no"/></head><body class="yui-skin-sam"><input id="state_hidden" name="state_hidden" type="text" size="1"/><span class="hide">Ignore this box please.</span><div id="spacing_hidden_wrapper"><div id="spacing_hidden"/></div><div id="add_to_browser" class="modal grp_modal"/><div id="add_to_browser_homepage" class="modal grp_modal"/><div id="feedback_modal" class="modal grp_modal"><h4 id="feedback_modal_title">Feedback</h4><a href="javascript:;" id="report_bad_query_link" class="icon bad" onclick="">Report Bad Results</a><span id="try_search_on_links" class="icon try" style="display: none;">Try <a target="_bangg" href="/?q=!g+foo">Google</a>, <a target="_bangb" href="/?q=!b+foo">Bing</a>, <a href="/bang.html" onclick="this.href='#';nbc();return false;">more…</a></span><a target="_help" href="feedback" class="icon ques">Other Help / Feedback</a></div><script type="text/javascript" src="/locales/en_US/LC_MESSAGES/duckduckgo-duckduckgo+sprintf+gettext+locale-simple.20130311.003843.js"/><script type="text/javascript" src="/d946.js"/><div id="header_wrapper"><div id="header"><div id="header_content_wrapper"><div id="header_content"><div class="clear"/><a tabindex="-1" href="/?t="><div id="header_logo"/></a><form id="search_form" name="x" action="/" onsubmit="return nbr()"><div id="search_elements_hidden"/><div id="search_wrapper"><input id="search_button" type="submit" tabindex="2" value=""/><a id="search_dropdown" href="javascript:;" tabindex="4" onclick="DDG.toggle('newbang');"/></div><input id="search_form_input_clear" type="button" tabindex="3" value=""/><input type="text" name="q" tabindex="1" autocomplete="off" id="search_form_input" onfocus="if ('rc' in window) {nua('nro',rc)};fq=1;" onblur="fq=0" onclick="if (this.value=='put search terms here') {this.value='';this.style.color='#000000';}" value="foo"/><select id="bang" size="2" onchange="if (ip) nbb(this);" onclick="if (!ip) nbb(this);" onblur="nbc(1);"/></form><div id="header_button_wrapper" onclick="DDG.toggle('header_button_menu')"><ul id="header_button"><li><div id="header_button_menu_wrapper"><a class="header_button_menu_item" id="header_button_menu_title" href="javascript:;">More</a><ul id="header_button_menu" class="grp_modal"><li><a href="/settings.html" tabindex="-1">Settings</a></li><li><a href="/about.html" tabindex="-1">About</a></li><li><a href="/goodies/" tabindex="-1">Goodies</a></li><li><a href="/feedback.html" tabindex="-1">Help</a></li><li class="header_button_menu_header">PRIVACY</li><li><a href="/privacy.html" tabindex="-1">Policy</a></li><li><a href="http://donttrack.us/" tabindex="-1">DontTrack</a></li><li><a href="http://dontbubble.us/" tabindex="-1">DontBubble</a></li><li><a href="http://whatisdnt.com/" tabindex="-1">WhatIsDNT</a></li><li><a href="http://fixtracking.com/" tabindex="-1">FixTracking</a></li><li class="header_button_menu_header">COMMUNITY</li><li><a href="http://duckduckhack.com/" tabindex="-1">Develop</a></li><li><a href="https://dukgo.com/" tabindex="-1">Translate</a></li><li><a href="/support.html" tabindex="-1">Support Us</a></li></ul></div></li></ul></div><div class="clear"/></div></div></div></div><div id="content_wrapper"><div id="content"><div id="side_wrapper"><div id="side_wrapper2"><div id="side"><div class="button"><script type="text/JavaScript">nib(0,'button-link add-to','','&nbsp;',0,0)</script></div><div id="feedback_wrapper"><div class="button"><span id="trig_feedback_modal" class="modal_trig"/><a tabindex="-1" href="javascript:;" rel="nofollow" class="button-link" onclick="DDG.mv_elem('feedback_modal','trig_feedback_modal');DDG.toggleall('grp_modal',-1,'feedback_modal');DDG.toggle('feedback_modal');">Give feedback</a></div></div><div id="side_suggestions" class="hide"/><div id="keyboard_shortcuts" class="hide"><div class="spacer_bottom_7">Keyboard shortcuts</div>h, /     search box<br/>j, ↓     next result<br/>k, ↑     prev result<br/>l, o, Enter     go<div id="keyboard_shortcuts_more" class="spacer_top_3"><a tabindex="-1" href="javascript:;" onclick="nsh('keyboard_shortcuts_more')">More...</a></div><div id="keyboard_shortcuts_more_hidden" class="hide"><br/>Ctrl+Enter     bg<br/>', v     new tab<br/>d     domain search<br/>t     Top<br/>!, 1     !bang dropdown<br/>esc     out of bangs<br/>s    Did you mean<br/>r     related topics<br/>m     main results<br/><a target="_blank" href="http://help.duckduckgo.com/customer/portal/articles/300862"> More explanation...</a></div></div><div id="side_powered_by_wrapper" class="hide"/></div></div></div><div id="zero_click_wrapper"><div id="zero_click"><div id="zero_click_wrapper2"><div id="zero_click_abstract" style="display:none;"/><div id="zero_click_header"><div id="zero_click_heading"><h1>Meanings of Foobar</h1></div><div id="zero_click_plus_wrapper" class="icon_zero_click_header"><a href="javascript:;" onclick="nra4()" id="zero_click_plus"> </a></div><div class="icon_zero_click_header"><a title="Definition" href="/?q=define+foo"><img src="/assets/icon_definition.v101.png" class="inline"/></a></div><div class="clear"/></div><div id="zero_click_topics"><div id="r2-0" class="results_disambig"><div class="icon_disambig"/><div class="links_zero_click_disambig highlight_1"><a href="/Foobar">Foobar</a>, an all-purpose placeholder name commonly used in computing</div></div><div id="r2-1" class="results_disambig"><div class="icon_disambig"><img id="i2" alt=""/></div><div class="links_zero_click_disambig highlight_1"><a href="/foobar2000">foobar2000</a>, an audio player for Microsoft Windows</div></div><div class="results_disambig"><div class="links_zero_click_disambig"><div class="zero_click_header_info">See also <hr class="horizontal_line horizontal_line_truncated"/></div></div></div><div id="r2-2" class="results_disambig"><div class="icon_disambig"/><div class="links_zero_click_disambig highlight_1"><a href="/d/FUBAR">FUBAR Meanings</a></div></div><div id="r2-3" class="results_disambig"><div class="icon_disambig"><img id="i3" alt="" class="img_disambig"/></div><div class="links_zero_click_disambig highlight_1"><a href="/flame_fougasse">Foo gas</a> - A flame fougasse is a type of mine which uses an explosive charge to project burning liquid onto a target.</div></div></div><div class="clear"> </div></div><div id="zero_click_abstract_stacked" class="zero_click_snippet" style="display:none;"/></div></div><div id="links_wrapper"><noscript>     This page requires Javascript. Get the non-JS version <a href="https://duckduckgo.com/html/?q=foo">here</a>.</noscript><div id="did_you_means"/><div id="ads"/><div id="links"/></div><div id="powered_by_wrapper"/><div id="bottom_spacing2"> </div></div></div><script type="text/javascript">nip();</script><script type="text/javascript">tig=new YAHOO.util.ImageLoader.group('body',null,0.01);nus('',2,ga+'www.foobar2000.org.ico',30,30);nus('',3,ga+'2ebf3f96.jpg');</script><script type="text/JavaScript">function nrji() {nrj('/d.js?q=foo&t=D&l=us-en&p=1&s=0');if (!DDG.is_ad_blocked) nrj('/y.js?s=1&q=foo');};if (ir) window.addEventListener('load', nrji, false);else nrji();</script><div id="z2"> </div><script type="text/JavaScript">if (ip) setTimeout('nuo(1)',500);</script><div id="z"> </div></body></html>
--------------------- >> end captured stdout << ----------------------
-------------------- >> begin captured logging << --------------------
urllib3.connectionpool: INFO: Starting new HTTP connection (1): duckduckgo.com
urllib3.connectionpool: DEBUG: "GET /?q=foo HTTP/1.1" 301 178
urllib3.connectionpool: INFO: Starting new HTTPS connection (1): duckduckgo.com
urllib3.connectionpool: DEBUG: "GET /?q=foo HTTP/1.1" 200 None
--------------------- >> end captured logging << ---------------------
======================================================================
ERROR: test_post (pyquery.test.TestWebScrapping)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/test.py", line 574, in test_post
self.assertEqual(d('input[name=q]:last').val(), 'foo')
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 237, in __call__
result = self.__class__(*args, parent=self, **kwargs)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 213, in __init__
xpath = self._css_to_xpath(selector)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 223, in _css_to_xpath
return self._translator.css_to_xpath(selector, prefix)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in css_to_xpath
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in <genexpr>
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 208, in selector_to_xpath
xpath = self.xpath(tree)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 230, in xpath
return method(parsed_selector)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 272, in xpath_pseudo
return method(self.xpath(pseudo.selector))
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/cssselectpatch.py", line 25, in xpath_last_pseudo
xpath.add_post_condition('position() = last()')
AttributeError: 'XPathExpr' object has no attribute 'add_post_condition'
-------------------- >> begin captured logging << --------------------
urllib3.connectionpool: INFO: Starting new HTTP connection (1): duckduckgo.com
urllib3.connectionpool: DEBUG: "POST / HTTP/1.1" 301 178
urllib3.connectionpool: INFO: Starting new HTTPS connection (1): duckduckgo.com
urllib3.connectionpool: DEBUG: "GET / HTTP/1.1" 200 None
--------------------- >> end captured logging << ---------------------
======================================================================
FAIL: Doctest: pyquery.pyquery.PyQuery.nextAll
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python2.7/doctest.py", line 2201, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for pyquery.pyquery.PyQuery.nextAll
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 434, in nextAll
----------------------------------------------------------------------
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 438, in pyquery.pyquery.PyQuery.nextAll
Failed example:
d('p:last').nextAll()
Exception raised:
Traceback (most recent call last):
File "/usr/lib64/python2.7/doctest.py", line 1289, in __run
compileflags, 1) in test.globs
File "<doctest pyquery.pyquery.PyQuery.nextAll[2]>", line 1, in <module>
d('p:last').nextAll()
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 237, in __call__
result = self.__class__(*args, parent=self, **kwargs)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 213, in __init__
xpath = self._css_to_xpath(selector)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 223, in _css_to_xpath
return self._translator.css_to_xpath(selector, prefix)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in css_to_xpath
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in <genexpr>
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 208, in selector_to_xpath
xpath = self.xpath(tree)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 230, in xpath
return method(parsed_selector)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 272, in xpath_pseudo
return method(self.xpath(pseudo.selector))
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/cssselectpatch.py", line 25, in xpath_last_pseudo
xpath.add_post_condition('position() = last()')
AttributeError: 'XPathExpr' object has no attribute 'add_post_condition'
======================================================================
FAIL: Doctest: pyquery.pyquery.PyQuery.prevAll
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python2.7/doctest.py", line 2201, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for pyquery.pyquery.PyQuery.prevAll
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 446, in prevAll
----------------------------------------------------------------------
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 450, in pyquery.pyquery.PyQuery.prevAll
Failed example:
d('p:last').prevAll()
Exception raised:
Traceback (most recent call last):
File "/usr/lib64/python2.7/doctest.py", line 1289, in __run
compileflags, 1) in test.globs
File "<doctest pyquery.pyquery.PyQuery.prevAll[2]>", line 1, in <module>
d('p:last').prevAll()
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 237, in __call__
result = self.__class__(*args, parent=self, **kwargs)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 213, in __init__
xpath = self._css_to_xpath(selector)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 223, in _css_to_xpath
return self._translator.css_to_xpath(selector, prefix)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in css_to_xpath
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in <genexpr>
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 208, in selector_to_xpath
xpath = self.xpath(tree)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 230, in xpath
return method(parsed_selector)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 272, in xpath_pseudo
return method(self.xpath(pseudo.selector))
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/cssselectpatch.py", line 25, in xpath_last_pseudo
xpath.add_post_condition('position() = last()')
AttributeError: 'XPathExpr' object has no attribute 'add_post_condition'
======================================================================
FAIL: Doctest: pyquery.pyquery.PyQuery.remove_namespaces
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python2.7/doctest.py", line 2201, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for pyquery.pyquery.PyQuery.remove_namespaces
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 285, in remove_namespaces
----------------------------------------------------------------------
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 291, in pyquery.pyquery.PyQuery.remove_namespaces
Failed example:
doc.remove_namespaces()
Expected:
[<foo>]
Got:
[<{http://example.com/foo}foo>]
======================================================================
FAIL: Doctest: pyquery.pyquery.PyQuery.xhtml_to_html
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python2.7/doctest.py", line 2201, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for pyquery.pyquery.PyQuery.xhtml_to_html
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 267, in xhtml_to_html
----------------------------------------------------------------------
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 274, in pyquery.pyquery.PyQuery.xhtml_to_html
Failed example:
doc.remove_namespaces()
Expected:
[<html>]
Got:
[<{http://www.w3.org/1999/xhtml}html>]
======================================================================
FAIL: Doctest:
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python2.7/doctest.py", line 2201, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/docs/ajax.txt", line 0
----------------------------------------------------------------------
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/docs/ajax.txt", line 42, in
Failed example:
print a.response.status
Expected:
200 OK
Got:
301 Moved Permanently
-------------------- >> begin captured logging << --------------------
restkit.client: DEBUG: Start to perform request: packages.python.org GET /pyquery/
restkit.client: DEBUG: Send headers: ['GET /pyquery/ HTTP/1.1\r\n', 'Host: packages.python.org\r\n', 'User-Agent: restkit/4.2.1\r\n', 'Accept-Encoding: identity\r\n', 'Content-Length: 0\r\n', 'Content-Type: application/octet-stream\r\n']
restkit.client: DEBUG: send body (chunked: False)
restkit.client: DEBUG: Start to parse response
restkit.client: DEBUG: Got response: (1, 1) 301 Moved Permanently
restkit.client: DEBUG: headers: [IOrderedDict([('Server', 'nginx/1.1.19'), ('Date', 'Sat, 06 Apr 2013 15:06:23 GMT'), ('Content-Type', 'text/html'), ('Content-Length', '185'), ('Location', 'http://pythonhosted.org/pyquery/')])]
restkit.client: DEBUG: return response class
--------------------- >> end captured logging << ---------------------
======================================================================
FAIL: test_replaceWith (pyquery.test.TestHTMLParser)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/test.py", line 492, in test_replaceWith
assert val == expected, (repr(val), repr(expected))
AssertionError: ('u\'<div class="portlet">\\n <a href="/toto">TestimageMy link text</a>\\n <a href="/toto2">imageMy link text 2</a>\\n Behind you, a three-headed HTML&dash;Entity!\\n </div>\\n \'', '\'<div class="portlet">\\n <a href="/toto">TestimageMy link text</a>\\n <a href="/toto2">imageMy link text 2</a>\\n Behind you, a three-headed HTML&dash;Entity!\\n </div>\'')
======================================================================
FAIL: test_replaceWith_with_function (pyquery.test.TestHTMLParser)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/test.py", line 503, in test_replaceWith_with_function
assert val == expected, (repr(val), repr(expected))
AssertionError: ('u\'<div class="portlet">\\n TestimageMy link text\\n imageMy link text 2\\n Behind you, a three-headed HTML&dash;Entity!\\n </div>\\n \'', '\'<div class="portlet">\\n TestimageMy link text\\n imageMy link text 2\\n Behind you, a three-headed HTML&dash;Entity!\\n </div>\'')
======================================================================
FAIL: Doctest:
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python2.7/doctest.py", line 2201, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/../README.rst", line 0
----------------------------------------------------------------------
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/../README.rst", line 61, in
Failed example:
d('p:first')
Exception raised:
Traceback (most recent call last):
File "/usr/lib64/python2.7/doctest.py", line 1289, in __run
compileflags, 1) in test.globs
File "<doctest [13]>", line 1, in <module>
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 237, in __call__
result = self.__class__(*args, parent=self, **kwargs)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 213, in __init__
xpath = self._css_to_xpath(selector)
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/pyquery.py", line 223, in _css_to_xpath
return self._translator.css_to_xpath(selector, prefix)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in css_to_xpath
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 188, in <genexpr>
for selector in selectors)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 208, in selector_to_xpath
xpath = self.xpath(tree)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 230, in xpath
return method(parsed_selector)
File "/usr/lib/python2.7/site-packages/cssselect/xpath.py", line 272, in xpath_pseudo
return method(self.xpath(pseudo.selector))
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/cssselectpatch.py", line 19, in xpath_first_pseudo
xpath.add_post_condition('position() = 1')
AttributeError: 'XPathExpr' object has no attribute 'add_post_condition'
-------------------- >> begin captured logging << --------------------
urllib3.connectionpool: INFO: Starting new HTTP connection (1): google.com
urllib3.connectionpool: DEBUG: "GET / HTTP/1.1" 301 219
urllib3.connectionpool: INFO: Starting new HTTP connection (1): www.google.com
urllib3.connectionpool: DEBUG: "GET / HTTP/1.1" 200 None
--------------------- >> end captured logging << ---------------------
======================================================================
FAIL: Doctest:
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python2.7/doctest.py", line 2201, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/docs/tips.txt", line 0
----------------------------------------------------------------------
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/docs/tips.txt", line 10, in
Failed example:
d('a[tabindex="-1"]').attr('href')
Expected:
'/about.html'
Got:
'/about'
----------------------------------------------------------------------
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/docs/tips.txt", line 14, in
Failed example:
d('a[tabindex="-1"]').attr('href')
Expected:
'http://duckduckgo.com/about.html'
Got:
'http://duckduckgo.com/about'
-------------------- >> begin captured logging << --------------------
urllib3.connectionpool: INFO: Starting new HTTP connection (1): duckduckgo.com
urllib3.connectionpool: DEBUG: "GET / HTTP/1.1" 301 178
urllib3.connectionpool: INFO: Starting new HTTPS connection (1): duckduckgo.com
urllib3.connectionpool: DEBUG: "GET / HTTP/1.1" 200 None
--------------------- >> end captured logging << ---------------------
======================================================================
FAIL: test_remove_namespaces (pyquery.test.TestXMLNamespace)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lmacken/rpmbuild/BUILD/pyquery-1.2.4/pyquery/test.py", line 558, in test_remove_namespaces
self.assertEqual(repr(val), repr(expected))
AssertionError: 'None' != "'What'"
----------------------------------------------------------------------
Ran 97 tests in 2.106s
FAILED (errors=5, failures=10)