A real XHTML document should come out *exactly* the same as it went in.
(self)
| 564 | self.assertEqual(markup, soup.encode("utf8")) |
| 565 | |
| 566 | def test_real_xhtml_document(self): |
| 567 | """A real XHTML document should come out *exactly* the same as it went in.""" |
| 568 | markup = b"""<?xml version="1.0" encoding="utf-8"?> |
| 569 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> |
| 570 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 571 | <head><title>Hello.</title></head> |
| 572 | <body>Goodbye.</body> |
| 573 | </html>""" |
| 574 | soup = self.soup(markup) |
| 575 | self.assertEqual( |
| 576 | soup.encode("utf-8"), markup) |
| 577 | |
| 578 | def test_formatter_processes_script_tag_for_xml_documents(self): |
| 579 | doc = """ |