summaryrefslogtreecommitdiff
path: root/bs4/testing.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2012-03-01 11:54:25 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2012-03-01 11:54:25 -0500
commit483286bfbb40bfabe4c48c9f31c59ef7449d64bb (patch)
treeae5b39346a0763444d981c66a1649abf3b36e8a9 /bs4/testing.py
parentae493c3544d07f0879c8a14e17d48b69c3c82772 (diff)
Added missing __len__ method that stopped html5lib tree builder from working on nested formatting elements. [bug=943246]
Diffstat (limited to 'bs4/testing.py')
-rw-r--r--bs4/testing.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bs4/testing.py b/bs4/testing.py
index 717e721..a3e0b38 100644
--- a/bs4/testing.py
+++ b/bs4/testing.py
@@ -132,6 +132,9 @@ class HTMLTreeBuilderSmokeTest(object):
self.assertTrue(soup.br.is_empty_element)
self.assertEqual(str(soup.br), "<br/>")
+ def test_nested_formatting_elements(self):
+ self.assertSoupEquals("<em><em></em></em>")
+
def test_comment(self):
# Comments are represented as Comment objects.
markup = "<p>foo<!--foobar-->baz</p>"