Merge lp://qastaging/~saschpe/beautifulsoup/beautifulsoup into lp://qastaging/beautifulsoup
Status: | Needs review |
---|---|
Proposed branch: | lp://qastaging/~saschpe/beautifulsoup/beautifulsoup |
Merge into: | lp://qastaging/beautifulsoup |
Diff against target: |
29 lines (+6/-1) (has conflicts) 2 files modified
bs4/testing.py (+1/-1) bs4/tests/test_lxml.py (+5/-0) Text conflict in bs4/tests/test_lxml.py |
To merge this branch: | bzr merge lp://qastaging/~saschpe/beautifulsoup/beautifulsoup |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Leonard Richardson | Pending | ||
Review via email: mp+200849@code.qastaging.launchpad.net |
Description of the change
LXML fixes
Unmerged revisions
- 324. By tar_scm test suite <root@localhost>
-
Fix lxml deprecation warning tests.
The class BeautifulStoneSoup is instanciated first in
bs4.tests.test_soup: LXMLTreeBuilder SmokeTest. test_beautifuls tonesoup_ is_xml_ parser
causing the UserWarning to be printed once. However, the deprecation test will
fail afterwards:ERROR: test_beautifuls
tonesoup (bs4.tests. test_soup. TestDeprecatedC onstructorArgum ents)
-------------- ------- ------- ------- ------- ------- ------- ------- -------
Traceback (most recent call last):
File "/root/Projects/ python/ beautifulsoup/ bs4/tests/ test_soup. py", line 69, in test_beautifuls tonesoup
self.assertTrue( "BeautifulStone Soup class is deprecated" in str(w[0].message))
IndexError: list index out of rangeInstead, don't eat the UserWarning in the first test so that the second one can
catch it properly. - 323. By tar_scm test suite <root@localhost>
-
Don't provide encoding for XML unicode tests with LXML.
ERROR: test_can_
parse_unicode_ document (bs4.tests. test_lxml. LXMLXMLTreeBuil derSmokeTest)
-------------- ------- ------- ------- ------- ------- ------- ------- -------
Traceback (most recent call last):
File "/root/Projects/ python/ beautifulsoup/ bs4/testing. py", line 498, in test_can_ parse_unicode_ document
self.assertEqual( u'Sacr\ xe9 bleu!', soup.root.string)
AttributeError: 'NoneType' object has no attribute 'string'As described at http://
lxml.de/ parsing. html#python- unicode- strings LXML doesn't like
Unicode XML that specifies a (wrong) encoding.