diff options
Diffstat (limited to 'src/beautifulsoup/tests/test_soup.py')
-rw-r--r-- | src/beautifulsoup/tests/test_soup.py | 6 |
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: |