From 234baf054be09c9d63e6ab55dc5e5ed542fe0139 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Mon, 19 Dec 2016 18:43:56 -0500 Subject: Fixed yet another problem that caused the html5lib tree builder to --- bs4/tests/test_html5lib.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'bs4/tests/test_html5lib.py') diff --git a/bs4/tests/test_html5lib.py b/bs4/tests/test_html5lib.py index 8e3cba6..2eb41b3 100644 --- a/bs4/tests/test_html5lib.py +++ b/bs4/tests/test_html5lib.py @@ -95,6 +95,23 @@ class HTML5LibBuilderSmokeTest(SoupTest, HTML5TreeBuilderSmokeTest): assert space1.next_element is tbody1 assert tbody2.next_element is space2 + def test_reparented_markup_containing_children(self): + markup = '
aftermath

aftermath

' + soup = self.soup(markup) + noscript = soup.noscript + self.assertEqual("target", noscript.next_element) + target = soup.find(string='target') + + # The 'aftermath' string was duplicated; we want the second one. + final_aftermath = soup.find_all(string='aftermath')[-1] + import pdb; pdb.set_trace() + + # The