From 5bd09164de9b5a45ffea4171968b8186dcdc6f69 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Thu, 11 Dec 2014 22:23:26 -0500 Subject: Improved the lxml tree builder's handling of processing instructions. [bug=1294645] --- bs4/tests/test_html5lib.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bs4/tests/test_html5lib.py') diff --git a/bs4/tests/test_html5lib.py b/bs4/tests/test_html5lib.py index 594c3e1..9a2bacf 100644 --- a/bs4/tests/test_html5lib.py +++ b/bs4/tests/test_html5lib.py @@ -83,3 +83,9 @@ class HTML5LibBuilderSmokeTest(SoupTest, HTML5TreeBuilderSmokeTest): soup = self.soup(markup) self.assertEqual(u"

foo

\n

bar

\n", soup.body.decode()) self.assertEqual(2, len(soup.find_all('p'))) + + def test_processing_instruction(self): + """Processing instructions become comments.""" + markup = b"""""" + soup = self.soup(markup) + assert str(soup).startswith("") -- cgit v1.2.3