def test_lenientParenting(self):
        """
        Test that C{parentNode} attributes are set to meaningful values when
        we are parsing HTML that lacks a root node.
        """
        # Spare the rod, ruin the child.
        s = "<br/><br/>"
        d = microdom.parseString(s, beExtremelyLenient=1)
        self.assertIdentical(d.documentElement,
                             d.documentElement.firstChild().parentNode)

        Test that C{parentNode} attributes are set to meaningful values when
        we are parsing HTML that lacks a root node.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_xml.py