'If a L{FlattenerError} is created with traceback frames, they are
included in the string representation of the exception.'

def test_traceback(self):

    def f():
        g()
    def g():
        raise RuntimeError('reason')
    try:
        f()
    except RuntimeError as e:
        tbinfo = traceback.extract_tb(sys.exc_info()[2])[1:]
        exc = e
    else:
        self.fail('f()    must    raise    RuntimeError')
    self.assertEqual(str(FlattenerError(exc, [], tbinfo)), ('Exception    while    flattening:\n        File    "%s",    line    %d,    in    f\n                g()\n        File    "%s",    line    %d,    in    g\n                raise    RuntimeError("reason")\nRuntimeError:    reason\n' % (HERE, (f.__code__.co_firstlineno + 1), HERE, (g.__code__.co_firstlineno + 1))))
