Closed idella closed 10 years ago
now let's try again with with the right runs. (Sorry for the confusion)
Running tox as is OR editing tox.ini and running one python at a time;
/path/to/pyquery-1.2.8 $ tox
we get
test_comment (tests.test_pyquery.TestComment) ... ok test_parser_persistance (tests.test_pyquery.TestHTMLParser) ... ok test_replaceWith (tests.test_pyquery.TestHTMLParser) ... FAIL test_replaceWith_with_function (tests.test_pyquery.TestHTMLParser) ... FAIL test_soup_parser (tests.test_pyquery.TestHTMLParser) ... ok test_class (tests.test_pyquery.TestManipulating) ... ok test_remove (tests.test_pyquery.TestManipulating) ... ok ---------------------------------------------------------- ============================================================== FAIL: test_replaceWith (tests.test_pyquery.TestHTMLParser) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/gen2/TmpDir/portage/dev-python/pyquery-1.2.8/work/pyquery-1.2.8/tests/test_pyquery.py", line 413, in test_replaceWith assert val == expected, (repr(val), repr(expected)) nose.proxy.AssertionError: ('\'<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>\'') d = pq(self.html) d('img').replace_with('image') '<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 ' = d.__html__() >> assert '<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>', (repr('<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 '), repr('<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 (tests.test_pyquery.TestHTMLParser) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/gen2/TmpDir/portage/dev-python/pyquery-1.2.8/work/pyquery-1.2.8/tests/test_pyquery.py", line 424, in test_replaceWith_with_function assert val == expected, (repr(val), repr(expected)) nose.proxy.AssertionError: ('\'<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>\'') d = pq(self.html) d('a').replace_with(lambda i, e: pq(e).html()) '<div class="portlet">\n TestimageMy link text\n imageMy link text 2\n Behind you, a three-headed HTML&dash;Entity!\n </div>\n ' = d.__html__() >> assert '<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>', (repr('<div class="portlet">\n TestimageMy link text\n imageMy link text 2\n Behind you, a three-headed HTML&dash;Entity!\n </div>\n '), repr('<div class="portlet">\n TestimageMy link text\n imageMy link text 2\n Behind you, a three-headed HTML&dash;Entity!\n </div>')) Name Stmts Miss Cover Missing ------------------------------------------------------ ------------------------------------------------------ pyquery 6 0 100% pyquery.ajax 56 4 93% 34, 38, 44, 53 pyquery.cssselectpatch 112 17 85% 23, 73-74, 131-132, 143-144, 149-150, 155-156, 161-162, 189, 200, 211, 223 pyquery.openers 53 10 81% 17-18, 36-37, 42, 58, 64-66, 72 pyquery.pyquery 725 73 90% 80-81, 88, 94, 98, 108, 130-133, 137, 144, 174, 199, 206-207, 220, 227-228, 256, 278-279, 311-312, 328-329, 393, 430, 436, 441, 671, 713, 716, 750, 753, 761, 794, 799, 892, 985, 998, 1001-1004, 1039, 1097, 1101, 1124, 1133-1134, 1147, 1149, 1170, 1191-1193, 1200, 1262, 1270-1271, 1276, 1282, 1307-1309, 1316-1320, 1325, 1357, 1396-1397, 1405 pyquery.rules 20 16 20% 4-5, 9-31 ------------------------------------------------------ TOTAL 972 120 88% ---------------------------------------------------------------------- Ran 95 tests in 4.870s FAILED (failures=2) ERROR: InvocationError: '/mnt/gen2/TmpDir/portage/dev-python/pyquery-1.2.8/work/pyquery-1.2.8/.tox/py32/bin/nosetests' _____________________________summary_________________________ ERROR: py32: commands failed
ERROR: py32 could read; py27 or py32 or py33.
All similar outcome. Given tox.ini states commands = {envbindir}/nosetests []
With system python set to py 2.7 or 3.2 or py3.3 and double checking by running straight nosetests from the source yields identical results.
now let's try again with with the right runs. (Sorry for the confusion)
Running tox as is OR editing tox.ini and running one python at a time;
/path/to/pyquery-1.2.8 $ tox
we get
ERROR: py32 could read; py27 or py32 or py33.
All similar outcome. Given tox.ini states commands = {envbindir}/nosetests []
With system python set to py 2.7 or 3.2 or py3.3 and double checking by running straight nosetests from the source yields identical results.