HaveF / feedparser

Automatically exported from code.google.com/p/feedparser
Other
0 stars 0 forks source link

installing chardet causes 11 unit test failures #323

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install feedparser 5.1 from svn into a virtualenv
2. cd feedparser; python feedparsertest.py produces just the failure seen in 
issue 314
3. pip install chardet, then repeat step 2.  now you see 11 additional failures

What is the expected output? What do you see instead?

I wouldn't expect the presence of chardet to produce additional failures.  They 
look like you're getting bogus encoding errors, e.g. in 
bozo_bogus_encoding.xml.  See attached file for details.

What version of the product are you using? On what operating system?

Version 5.1 from svn head as of 18-Jan-2012.  Ubuntu Precise (what will be 
12.04)

Please provide any additional information below.

Original issue reported on code.google.com by war...@gmail.com on 18 Jan 2012 at 3:19

Attachments:

GoogleCodeExporter commented 9 years ago
Looks like all the .xml files in tests/illformed/chardet are failing.

Original comment by war...@gmail.com on 18 Jan 2012 at 3:22

GoogleCodeExporter commented 9 years ago
Note too that test_unicode_2 fails when sys.getfilesystemencoding() is not 
utf-8.  It can be ANSI_X3.4-1968 (aka ASCII) in the Ubuntu schroot build 
environments.  In that case, the open() call in _open_resource() throws a 
UnicodeEncodeError instead of the expected IOError.

Original comment by war...@gmail.com on 18 Jan 2012 at 7:39

GoogleCodeExporter commented 9 years ago
Fixed in r680. This was being caused because the encoding reported by chardet 
was a str instead of a unicode object. Thanks for reporting this!

I've created issue 326 to track the UnicodeEncodeError you mentioned in comment 
2.

Original comment by kurtmckee on 5 Feb 2012 at 12:09