Open GoogleCodeExporter opened 9 years ago
I just ran the tests to complete my description. There were 3 failures:
======================================================================
FAIL: test_001279 (__main__.TestStrictParser)
./tests/wellformed/mf_hcard/3-5-5-org-unicode.xml: hcard contains non-ascii
character
----------------------------------------------------------------------
Traceback (most recent call last):
File "feedparsertest.py", line 752, in <lambda>
self.failUnlessEval(xmlfile, evalString)
File "feedparsertest.py", line 166, in failUnlessEval
raise self.failureException, failure
AssertionError: not eval(not bozo and entries[0]['vcard'] ==
u"BEGIN:vCard\nVERSION:3.0\nORG:\u00b4\nEND:vCard")
WITH env({'bozo': 0,
'encoding': u'utf-8',
'entries': [{'content': [{'base': u'',
'language': None,
'type': u'text/html',
'value': u'<div class="vcard">\n<span class="org">\xb4</span>\n</div>'}],
'summary': u'<div class="vcard">\n<span class="org">\xb4</span>\n</div>',
'vcard': u'BEGIN:vCard\nVERSION:3.0\nORG:\xc2\xb4\nEND:vCard'}],
'feed': {},
'namespaces': {'': u'http://www.w3.org/2005/Atom'},
'version': u'atom10'})
======================================================================
FAIL: test_001279 (__main__.TestLooseParser)
./tests/wellformed/mf_hcard/3-5-5-org-unicode.xml: hcard contains non-ascii
character
----------------------------------------------------------------------
Traceback (most recent call last):
File "feedparsertest.py", line 752, in <lambda>
self.failUnlessEval(xmlfile, evalString)
File "feedparsertest.py", line 166, in failUnlessEval
raise self.failureException, failure
AssertionError: not eval(not bozo and entries[0]['vcard'] ==
u"BEGIN:vCard\nVERSION:3.0\nORG:\u00b4\nEND:vCard")
WITH env({'bozo': 0,
'encoding': u'utf-8',
'entries': [{'content': [{'base': u'',
'language': None,
'type': u'text/html',
'value': u'<div class="vcard">\n<span class="org">\xb4</span>\n</div>'}],
'summary': u'<div class="vcard">\n<span class="org">\xb4</span>\n</div>',
'vcard': u'BEGIN:vCard\nVERSION:3.0\nORG:\xc2\xb4\nEND:vCard'}],
'feed': {},
'namespaces': {'': u'http://www.w3.org/2005/Atom'},
'version': u'atom10'})
======================================================================
FAIL: test_000018 (__main__.TestMicroformats)
./tests/microformats/hcard/3-1-1-fn-unicode-char.xml: unicode character in
microformat
----------------------------------------------------------------------
Traceback (most recent call last):
File "feedparsertest.py", line 752, in <lambda>
self.failUnlessEval(xmlfile, evalString)
File "feedparsertest.py", line 166, in failUnlessEval
raise self.failureException, failure
AssertionError: not eval(not bozo and entries[0].vcard ==
u'BEGIN:vCard\nVERSION:3.0\nFN:Tantek
\xc7elik\nN:\xc7elik;Tantek\nURL:http://tantek.com/\nEND:vCard')
WITH env({'bozo': 0,
'encoding': u'utf-8',
'entries': [{'content': [{'base': u'',
'language': None,
'type': u'text/html',
'value': u'<span class="vcard"><a class="url fn" href="http://tantek.com/">Tantek \xc7elik</a></span>'}],
'summary': u'<span class="vcard"><a class="url fn" href="http://tantek.com/">Tantek \xc7elik</a></span>',
'vcard': u'BEGIN:vCard\nVERSION:3.0\nFN:Tantek \u0102&Dagger\\;elik\nN:\u0102&Dagger\\;elik;Tantek\nURL:http://tantek.com/\nEND:vCard'}],
'feed': {},
'namespaces': {'content': u'http://purl.org/rss/1.0/modules/content/'},
'version': u'rss20'})
----------------------------------------------------------------------
Ran 4384 tests in 314.721s
Original comment by drthomas...@googlemail.com
on 16 Nov 2013 at 10:24
Thanks for this information! I appreciate that you ran the unit tests, but
don't fret about those test failures -- I've removed the microformat parsing
completely and that'll be in the next release of feedparser.
Quick question, have you tried disabling the HTML sanitization for additional
speed comparisons? Also, uninstalling BeautifulSoup may really help speed
things up. The microformat code was very slow.
I have an rpi and may have an opportunity to test this in the future.
Original comment by kurtmckee
on 10 Jul 2014 at 2:20
Original issue reported on code.google.com by
drthomas...@googlemail.com
on 16 Nov 2013 at 9:22Attachments: