lp:~saschpe/beautifulsoup/beautifulsoup
- Get this branch:
- bzr branch lp:~saschpe/beautifulsoup/beautifulsoup
Branch merges
- Leonard Richardson: Pending requested
-
Diff: 29 lines (+6/-1) (has conflicts)2 files modifiedbs4/testing.py (+1/-1)
bs4/tests/test_lxml.py (+5/-0)
Branch information
Recent 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. - 321. By Leonard Richardson
-
A NavigableString object now has an immutable '.name' property whose
+ value is always None. This makes it easier to iterate over a mixed
+ list of tags and strings without having to check whether each
+ element is a tag or a string.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:beautifulsoup