summaryrefslogtreecommitdiff
path: root/bs4/tests/test_html5lib.py
diff options
context:
space:
mode:
authorGeoffrey Sneddon <me@gsnedders.com>2015-12-08 16:02:57 +0000
committerGeoffrey Sneddon <me@gsnedders.com>2015-12-08 16:02:57 +0000
commita07a28ac10e5686d096fd0f4225e01ff137ec80f (patch)
tree06f1da2dd59aae973c0a4047f89f83d8c68f82bf /bs4/tests/test_html5lib.py
parent6780794cdcc52305691f7a299015bfb9b5941e27 (diff)
Fix foster parenting with html5lib.
This makes all of the html5lib tests pass. Yay!
Diffstat (limited to 'bs4/tests/test_html5lib.py')
-rw-r--r--bs4/tests/test_html5lib.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bs4/tests/test_html5lib.py b/bs4/tests/test_html5lib.py
index 65536c2..34883fe 100644
--- a/bs4/tests/test_html5lib.py
+++ b/bs4/tests/test_html5lib.py
@@ -96,3 +96,8 @@ class HTML5LibBuilderSmokeTest(SoupTest, HTML5TreeBuilderSmokeTest):
a1, a2 = soup.find_all('a')
self.assertEqual(a1, a2)
assert a1 is not a2
+
+ def test_foster_parenting(self):
+ markup = b"""<table><td></tbody>A"""
+ soup = self.soup(markup)
+ self.assertEqual(u"<body>A<table><tbody><tr><td></td></tr></tbody></table></body>", soup.body.decode())