def test_sourceLineElement(self):
        """
        L{_SourceLineElement} renders a source line and line number.
        """
        element = _SourceLineElement(
            TagLoader(tags.div(
                    tags.span(render="lineNumber"),
                    tags.span(render="sourceLine"))),
            50, "    print 'hello'")
        d = flattenString(None, element)
        expected = (
            u"<div><span>50</span><span>"
            u" \N{NO-BREAK SPACE} \N{NO-BREAK SPACE}print 'hello'</span></div>")
        d.addCallback(
            self.assertEqual, expected.encode('utf-8'))
        return d

        L{_SourceLineElement} renders a source line and line number.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_util.py