diff options
author | Leonard Richardson <leonardr@segfault.org> | 2015-09-28 19:39:00 -0400 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2015-09-28 19:39:00 -0400 |
commit | 6a52d2e45195049ed7ef5b5862edf530eba518d0 (patch) | |
tree | 41b79df141072a06beada94b668934f22cc199b2 /bs4/testing.py | |
parent | 6f113b66f8084f900470b8931c107d96d28f5dd7 (diff) |
Corrected the output of Declaration objects. [bug=1477847]
Diffstat (limited to 'bs4/testing.py')
-rw-r--r-- | bs4/testing.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bs4/testing.py b/bs4/testing.py index 9e5e295..847c9fc 100644 --- a/bs4/testing.py +++ b/bs4/testing.py @@ -556,6 +556,11 @@ class XMLTreeBuilderSmokeTest(object): self.assertEqual( soup.encode(), b'<?xml version="1.0" encoding="utf-8"?>\n<root/>') + def test_xml_declaration(self): + markup = b"""<?xml version="1.0" encoding="utf8"?>\n<foo/>""" + soup = self.soup(markup) + self.assertEqual(markup, soup.encode("utf8")) + def test_real_xhtml_document(self): """A real XHTML document should come out *exactly* the same as it went in.""" markup = b"""<?xml version="1.0" encoding="utf-8"?> |