diff options
| author | Leonard Richardson <leonardr@segfault.org> | 2014-12-11 22:23:26 -0500 |
|---|---|---|
| committer | Leonard Richardson <leonardr@segfault.org> | 2014-12-11 22:23:26 -0500 |
| commit | 5bd09164de9b5a45ffea4171968b8186dcdc6f69 (patch) | |
| tree | 0784b1c3e6ef5a803d9323e056d14bbbc07ebc06 /bs4/tests/test_html5lib.py | |
| parent | 3c133d8d12f314ff3d70195cc0422e8e087b7829 (diff) | |
Improved the lxml tree builder's handling of processing
instructions. [bug=1294645]
Diffstat (limited to 'bs4/tests/test_html5lib.py')
| -rw-r--r-- | bs4/tests/test_html5lib.py | 6 |
1 files changed, 6 insertions, 0 deletions
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"<body><p><em>foo</em></p><em>\n</em><p><em>bar<a></a></em></p>\n</body>", soup.body.decode()) self.assertEqual(2, len(soup.find_all('p'))) + + def test_processing_instruction(self): + """Processing instructions become comments.""" + markup = b"""<?PITarget PIContent?>""" + soup = self.soup(markup) + assert str(soup).startswith("<!--?PITarget PIContent?-->") |
