def test_reprWithoutRootsAndWithTraceback(self):
        """
        The representation of a L{FlattenerError} initialized without roots but
        with a traceback contains a formatted traceback but no roots.
        """
        e = self.makeFlattenerError([])
        self.assertTrue(
            re.match('Exception while flattening:\n'
                     '  File "[^"]*", line [0-9]*, in makeFlattenerError\n'
                     '    raise RuntimeError\("oh noes"\)\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