diff options
author | Leonard Richardson <leonardr@segfault.org> | 2017-05-06 21:31:10 -0400 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2017-05-06 21:31:10 -0400 |
commit | 797c844c569f0f32ee243642bb6a286d12a004a8 (patch) | |
tree | efcb0134d06ffb26b38382b3e3971fa45a32d48f /bs4/testing.py | |
parent | 9f811070c46bfca9868b0365b8c209bd2ca17924 (diff) |
Improved the handling of empty-element tags like <br> when using the
html.parser parser. [bug=1676935]
Diffstat (limited to 'bs4/testing.py')
-rw-r--r-- | bs4/testing.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bs4/testing.py b/bs4/testing.py index 9d89de7..40ccac6 100644 --- a/bs4/testing.py +++ b/bs4/testing.py @@ -342,6 +342,13 @@ Hello, world! self.assertEqual("p", soup.p.name) self.assertConnectedness(soup) + def test_empty_element_tags(self): + """Verify consistent handling of empty-element tags, + no matter how they come in through the markup. + """ + self.assertSoupEquals('<br/><br/><br/>', "<br/><br/><br/>") + self.assertSoupEquals('<br /><br /><br />', "<br/><br/><br/>") + def test_head_tag_between_head_and_body(self): "Prevent recurrence of a bug in the html5lib treebuilder." content = """<html><head></head> |