def test_trailingTextDropping(self):
        """
        Ensure that no *trailing* text in a mal-formed
        no-top-level-element document(s) will not be dropped.
        """
        s = "<br>Hi orders!"
        d = microdom.parseString(s, beExtremelyLenient=True)
        self.assertEqual(d.firstChild().toxml(),
                          '<html><br />Hi orders!</html>')
        byteStream = BytesIO()
        d.firstChild().writexml(byteStream, '', '', '', '', {}, '')
        self.assertEqual(byteStream.getvalue(),
                         b'<html><br />Hi orders!</html>')

        Ensure that no *trailing* text in a mal-formed
        no-top-level-element document(s) will not be dropped.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_xml.py