pyquery.test.TestHTMLParser.test_replaceWith() and pyquery.test.TestHTMLParser.test_replaceWith_with_function() fail

Arfrever Frehtes Taifersar Arahesis avatarArfrever Frehtes Taifersar Arahesis created an issue

pyquery.test.TestHTMLParser.test_replaceWith() and pyquery.test.TestHTMLParser.test_replaceWith_with_function() fail with all versions of CPython. I use pyquery-1.2.3, cssselect-0.7.1, lxml-3.0.1 and WebOb-1.2.3.

======================================================================
FAIL: test_replaceWith (pyquery.test.TestHTMLParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/pyquery-1.2.3/pyquery/test.py", line 482, in test_replaceWith
    assert val == expected, (repr(val), repr(expected))
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&amp;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&amp;dash;Entity!\\n    </div>\'')

======================================================================
FAIL: test_replaceWith_with_function (pyquery.test.TestHTMLParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/pyquery-1.2.3/pyquery/test.py", line 493, in test_replaceWith_with_function
    assert val == expected, (repr(val), repr(expected))
AssertionError: ('\'<div class="portlet">\\n      TestimageMy link text\\n      imageMy link text 2\\n      Behind you, a three-headed HTML&amp;dash;Entity!\\n    </div>\\n    \'', '\'<div class="portlet">\\n      TestimageMy link text\\n      imageMy link text 2\\n      Behind you, a three-headed HTML&amp;dash;Entity!\\n    </div>\'')

----------------------------------------------------------------------

Comments (4)

  1. Gael Pasgrimaud

    Same as yours:

    % ls -l .tox/py*/lib/python*/site-packages |grep egg-info                                                                                                                                                                                  ✭
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:32 cssselect-0.7.1-py2.6.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:32 lxml-3.0.1-py2.6.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:58 pyquery-1.2.3-py2.6.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:31 zc.buildout-1.6.3-py2.6.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:34 cssselect-0.7.1-py2.7.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:34 lxml-3.0.1-py2.7.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:58 pyquery-1.2.3-py2.7.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:33 zc.buildout-1.6.3-py2.7.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:40 cssselect-0.7.1-py3.2.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:40 lxml-3.0.1-py3.2.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:37 nose-1.2.1-py3.2.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:58 pyquery-1.2.3-py3.2.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:37 WebOb-1.2.3-py3.2.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:43 cssselect-0.7.1-py3.3.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:43 lxml-3.0.1-py3.3.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:41 nose-1.2.1-py3.3.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:59 pyquery-1.2.3-py3.3.egg-info
    drwxrwxr-x 2 gawel gawel 4096 2012-11-28 21:41 WebOb-1.2.3-py3.3.egg-info
    
    I'm closing this issue (moving to github). Open one on https://github.com/gawel/pyquery/issues if you find a clue.
    
  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.