def test_reprWithoutRootsAndWithoutTraceback(self):
        """
        The representation of a L{FlattenerError} initialized without roots but
        with a traceback contains a formatted traceback but no roots.
        """
        e = error.FlattenerError(RuntimeError("oh noes"), [], None)
        self.assertTrue(
            re.match('Exception while flattening:\n'
                     'RuntimeError: oh noes\n$',
                     repr(e), re.M | re.S),
            repr(e))

        The representation of a L{FlattenerError} initialized without roots but
        with a traceback contains a formatted traceback but no roots.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_error.py