[lxml-dev] broken output of lxml.html.clean.clean_html
Stefan Behnel
stefan_ml at behnel.de
Sat Jan 12 17:50:11 CET 2008
Hi,
Jon Rosebaugh wrote:
> The tgz linked from the website
> (http://codespeak.net/lxml/dev/index.html#download ->
> http://codespeak.net/lxml/dev/lxml-2.0beta1.tgz) gives me a 404
Ah, thanks. I uploaded it to the /lxml directory and forgot to set a link from
/lxml/dev...
> When I tried just running 'easy_install lxml' without Cython
> installed, I got compilation errors which I was able to reproduce
> yesterday, but not today
:) Well, good to know that it works now.
Regarding the missing files, maybe you ran "make clean" somewhere in between
your tests, that deletes the .c files (which are generated and usually
expected to be in the way when you call "make clean" as a developer).
>> What's the version of libxml2 you are using? Can you try running the test
>> suite and see if that works for you?
>
> I used libxml2 2.6.30_0 and libxslt 1.1.22_0, both of which are the
> latest versions in macports.
... and they should work just fine - except for <embed> tags, which are broken
in libxml2 2.6.29/30 (and fixed in 2.6.31). But that wasn't your problem here.
> I tried running the test suite with 'make test' and 'python test.py',
> and got the same results. test_clean seems to pass, but I got the same
> strange result as I got yesterday when I try the example in the python
> interpreter.
Ah, I think I know what happens. It's the special doctest support for HTML
output. To compare the results in the doctest, we parse the expected output
with the HTML parser, which also fixes the output that you see in the console
and makes it usable HTML. So that keeps us from seeing that the cleanup
actually produces garbage...
I'll look into it.
> The test suite fails with 14 errors.
> ======================================================================
> ERROR: test_feed_parser_error_broken
> (lxml.tests.test_elementtree.ElementTreeTestCase)
[...]
Those are fine, you don't have a suitable ElementTree version installed (lxml
2.0 heads for compatibility with ET 1.3, which is not released yet). I
actually thought I had disabled those tests for older ET versions...
More information about the lxml-dev
mailing list