diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2010-12-29 10:38:46 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2010-12-29 10:38:46 -0500 |
commit | 7ba9e49cada146978c1f02d9c28430fdcf56ab72 (patch) | |
tree | 77fd6a9d2ab9940569e21e0bcd6b29fed33b03ee /src/beautifulsoup/builder/lxml_builder.py | |
parent | 017a21625f347665ad23da6dd109b9af29b4b443 (diff) |
Refactored the code that turns HTML fragments into parser-specific documents for test purposes.
Diffstat (limited to 'src/beautifulsoup/builder/lxml_builder.py')
-rw-r--r-- | src/beautifulsoup/builder/lxml_builder.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/beautifulsoup/builder/lxml_builder.py b/src/beautifulsoup/builder/lxml_builder.py index 4949fea..3e1de5f 100644 --- a/src/beautifulsoup/builder/lxml_builder.py +++ b/src/beautifulsoup/builder/lxml_builder.py @@ -29,3 +29,8 @@ class LXMLTreeBuilder(HTMLTreeBuilder): self.soup.endData() self.soup.handle_data(content) self.soup.endData(Comment) + + def test_fragment_to_document(self, fragment): + """See `TreeBuilder`.""" + return u'<html><body>%s</body></html>' % fragment + |