summaryrefslogtreecommitdiff
path: root/src/beautifulsoup/tests/test_soup.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2010-12-26 15:27:37 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2010-12-26 15:27:37 -0500
commit9bf34da305075da4f934d381028a9e4b8c2e7717 (patch)
treeeeb275f40cd60ab8afb3006b59093c87fdc872e7 /src/beautifulsoup/tests/test_soup.py
parent66237256dfec2976aa62cff78ae1dbeafab0c4cf (diff)
Got lxml test suite to work.
Diffstat (limited to 'src/beautifulsoup/tests/test_soup.py')
-rw-r--r--src/beautifulsoup/tests/test_soup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/beautifulsoup/tests/test_soup.py b/src/beautifulsoup/tests/test_soup.py
index ff91104..c5a02b6 100644
--- a/src/beautifulsoup/tests/test_soup.py
+++ b/src/beautifulsoup/tests/test_soup.py
@@ -19,13 +19,15 @@ def additional_tests():
class SoupTest(unittest.TestCase):
- def assertSoupEquals(self, toParse, rep=None, c=BeautifulSoup,
+ default_builder = HTMLParserXMLTreeBuilder()
+
+ def assertSoupEquals(self, toParse, rep=None, builder=None,
encoding=None):
"""Parse the given text and make sure its string rep is the other
given text."""
if rep == None:
rep = toParse
- obj = c(toParse)
+ obj = BeautifulSoup(toParse, builder=self.default_builder)
if encoding is None:
rep2 = obj.decode()
else: