def test_renderException(self):
        """
        L{ResourceScriptDirectory.getChild} returns a resource which renders a
        response with the HTTP 200 status code and the content of the rpy's
        C{request} global.
        """
        tmp = FilePath(self.mktemp())
        tmp.makedirs()
        child = tmp.child("test.epy")
        child.setContent(b'raise Exception("nooo")')
        resource = PythonScript(child._asBytesPath(), None)
        request = DummyRequest([b''])
        d = _render(resource, request)
        def cbRendered(ignored):
            self.assertIn(b"nooo", b"".join(request.written))
        d.addCallback(cbRendered)
        return d

        L{ResourceScriptDirectory.getChild} returns a resource which renders a
        response with the HTTP 200 status code and the content of the rpy's
        C{request} global.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_script.py