From c3090d7e7337f88853fc5371c6d8011eb638c37f Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sun, 20 Feb 2011 19:30:01 -0500 Subject: Renamed constructor arguments to comply with PEP 8. --- tests/test_tree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/test_tree.py') diff --git a/tests/test_tree.py b/tests/test_tree.py index 384d518..cefdf4a 100644 --- a/tests/test_tree.py +++ b/tests/test_tree.py @@ -863,7 +863,7 @@ class TestSubstitutions(SoupTest): # meta tag got filtered out by the strainer. This test makes # sure that doesn't happen. strainer = SoupStrainer('pre') - soup = self.soup(markup, parseOnlyThese=strainer) + soup = self.soup(markup, parse_only=strainer) self.assertEquals(soup.contents[0].name, 'pre') -- cgit v1.2.3 From 121361b1835a619ae03fce39cb5569f28968f1b0 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sun, 20 Feb 2011 19:39:31 -0500 Subject: Started using the builder registry. --- tests/test_tree.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/test_tree.py') diff --git a/tests/test_tree.py b/tests/test_tree.py index cefdf4a..0232bac 100644 --- a/tests/test_tree.py +++ b/tests/test_tree.py @@ -13,6 +13,7 @@ import copy import cPickle as pickle import re from beautifulsoup import BeautifulSoup +from beautifulsoup.builder import registry from beautifulsoup.element import CData, SoupStrainer, Tag from beautifulsoup.testing import SoupTest @@ -523,7 +524,7 @@ class TestTreeModification(SoupTest): self.assertEqual(soup.decode(), self.document_for('')) def test_new_tag_creation(self): - builder = BeautifulSoup.default_builder() + builder = registry.lookup('html5lib')() soup = self.soup("", builder=builder) a = Tag(soup, builder, 'a') ol = Tag(soup, builder, 'ol') -- cgit v1.2.3 From 4afd4ca029aed4c5e2bc225e3938f4f4879ba155 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sun, 20 Feb 2011 19:41:15 -0500 Subject: Renamed the registry variable to builder_registry. --- tests/test_tree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test_tree.py') diff --git a/tests/test_tree.py b/tests/test_tree.py index 0232bac..0b3d72e 100644 --- a/tests/test_tree.py +++ b/tests/test_tree.py @@ -13,7 +13,7 @@ import copy import cPickle as pickle import re from beautifulsoup import BeautifulSoup -from beautifulsoup.builder import registry +from beautifulsoup.builder import builder_registry from beautifulsoup.element import CData, SoupStrainer, Tag from beautifulsoup.testing import SoupTest @@ -524,7 +524,7 @@ class TestTreeModification(SoupTest): self.assertEqual(soup.decode(), self.document_for('')) def test_new_tag_creation(self): - builder = registry.lookup('html5lib')() + builder = builder_registry.lookup('html5lib')() soup = self.soup("", builder=builder) a = Tag(soup, builder, 'a') ol = Tag(soup, builder, 'ol') -- cgit v1.2.3