summaryrefslogtreecommitdiff
path: root/bs4/testing.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2013-05-07 09:40:47 -0400
committerLeonard Richardson <leonardr@segfault.org>2013-05-07 09:40:47 -0400
commit457fa9096e5cee673063b41d58da9f2442814f0f (patch)
treea5bfd05b0d7e4caa2f0cce2bd7a63725057f3bd8 /bs4/testing.py
parent4a0f656752dc2de3f3451397e09e806ad2874ea1 (diff)
parent5b3860ec348b66976de64b5be407704041102869 (diff)
Merged.
Diffstat (limited to 'bs4/testing.py')
-rw-r--r--bs4/testing.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bs4/testing.py b/bs4/testing.py
index c9307d3..ed71d3b 100644
--- a/bs4/testing.py
+++ b/bs4/testing.py
@@ -81,6 +81,11 @@ class HTMLTreeBuilderSmokeTest(object):
self.assertDoctypeHandled(
'html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"')
+ def test_empty_doctype(self):
+ soup = self.soup("<!DOCTYPE>")
+ doctype = soup.contents[0]
+ self.assertEqual("", doctype.strip())
+
def test_public_doctype_with_url(self):
doctype = 'html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"'
self.assertDoctypeHandled(doctype)