def assertDetailedTraceback(self, captureVars=False, cleanFailure=False):
    "\n        Assert that L{printDetailedTraceback} produces and prints a detailed\n        traceback.\n\n        The detailed traceback consists of a header::\n\n          *--- Failure #20 ---\n\n        The body contains the stacktrace::\n\n          /twisted/trial/_synctest.py:1180: _run(...)\n          /twisted/python/util.py:1076: runWithWarningsSuppressed(...)\n          --- <exception caught here> ---\n          /twisted/test/test_failure.py:39: getDivisionFailure(...)\n\n        If C{captureVars} is enabled the body also includes a list of\n        globals and locals::\n\n           [ Locals ]\n             exampleLocalVar : 'xyz'\n             ...\n           ( Globals )\n             ...\n\n        Or when C{captureVars} is disabled::\n\n           [Capture of Locals and Globals disabled (use captureVars=True)]\n\n        When C{cleanFailure} is enabled references to other objects are removed\n        and replaced with strings.\n\n        And finally the footer with the L{Failure}'s value::\n\n          exceptions.ZeroDivisionError: float division\n          *--- End of Failure #20 ---\n\n        @param captureVars: Enables L{Failure.captureVars}.\n        @type captureVars: C{bool}\n        @param cleanFailure: Enables L{Failure.cleanFailure}.\n        @type cleanFailure: C{bool}\n        "
    if captureVars:
        exampleLocalVar = 'xyz'
        exampleLocalVar
    f = getDivisionFailure(captureVars=captureVars)
    out = NativeStringIO()
    if cleanFailure:
        f.cleanFailure()
    f.printDetailedTraceback(out)
    tb = out.getvalue()
    start = ('*--- Failure #%d%s---\n' % (f.count, ((f.pickled and ' (pickled) ') or ' ')))
    end = ('%s: %s\n*--- End of Failure #%s ---\n' % (reflect.qual(f.type), reflect.safe_str(f.value), f.count))
    self.assertTracebackFormat(tb, start, end)
    linesWithVars = [line for line in tb.splitlines() if line.startswith('  ')]
    if captureVars:
        self.assertNotEqual([], linesWithVars)
        if cleanFailure:
            line = '  exampleLocalVar : "\'xyz\'"'
        else:
            line = "  exampleLocalVar : 'xyz'"
        self.assertIn(line, linesWithVars)
    else:
        self.assertEqual([], linesWithVars)
        self.assertIn(' [Capture of Locals and Globals disabled (use captureVars=True)]\n', tb)
Assert that L{printDetailedTraceback} produces and prints a detailed
traceback.

The detailed traceback consists of a header::

  *--- Failure #20 ---

The body contains the stacktrace::

  /twisted/trial/_synctest.py:1180: _run(...)
  /twisted/python/util.py:1076: runWithWarningsSuppressed(...)
  --- <exception caught here> ---
  /twisted/test/test_failure.py:39: getDivisionFailure(...)

If C{captureVars} is enabled the body also includes a list of
globals and locals::

   [ Locals ]
     exampleLocalVar : 'xyz'
     ...
   ( Globals )
     ...

Or when C{captureVars} is disabled::

   [Capture of Locals and Globals disabled (use captureVars=True)]

When C{cleanFailure} is enabled references to other objects are removed
and replaced with strings.

And finally the footer with the L{Failure}'s value::

  exceptions.ZeroDivisionError: float division
  *--- End of Failure #20 ---

@param captureVars: Enables L{Failure.captureVars}.
@type captureVars: C{bool}
@param cleanFailure: Enables L{Failure.cleanFailure}.
@type cleanFailure: C{bool}
def assertDetailedTraceback(self, captureVars=False, cleanFailure=False):
    "\n        Assert that L{printDetailedTraceback} produces and prints a detailed\n        traceback.\n\n        The detailed traceback consists of a header::\n\n          *--- Failure #20 ---\n\n        The body contains the stacktrace::\n\n          /twisted/trial/_synctest.py:1180: _run(...)\n          /twisted/python/util.py:1076: runWithWarningsSuppressed(...)\n          --- <exception caught here> ---\n          /twisted/test/test_failure.py:39: getDivisionFailure(...)\n\n        If C{captureVars} is enabled the body also includes a list of\n        globals and locals::\n\n           [ Locals ]\n             exampleLocalVar : 'xyz'\n             ...\n           ( Globals )\n             ...\n\n        Or when C{captureVars} is disabled::\n\n           [Capture of Locals and Globals disabled (use captureVars=True)]\n\n        When C{cleanFailure} is enabled references to other objects are removed\n        and replaced with strings.\n\n        And finally the footer with the L{Failure}'s value::\n\n          exceptions.ZeroDivisionError: float division\n          *--- End of Failure #20 ---\n\n        @param captureVars: Enables L{Failure.captureVars}.\n        @type captureVars: C{bool}\n        @param cleanFailure: Enables L{Failure.cleanFailure}.\n        @type cleanFailure: C{bool}\n        "
    if captureVars:
        exampleLocalVar = 'xyz'
        exampleLocalVar
    f = getDivisionFailure(captureVars=captureVars)
    out = NativeStringIO()
    if cleanFailure:
        f.cleanFailure()
    f.printDetailedTraceback(out)
    tb = out.getvalue()
    start = ('*--- Failure #%d%s---\n' % (f.count, ((f.pickled and ' (pickled) ') or ' ')))
    end = ('%s: %s\n*--- End of Failure #%s ---\n' % (reflect.qual(f.type), reflect.safe_str(f.value), f.count))
    self.assertTracebackFormat(tb, start, end)
    linesWithVars = [line for line in tb.splitlines() if line.startswith('  ')]
    if captureVars:
        self.assertNotEqual([], linesWithVars)
        if cleanFailure:
            line = '  exampleLocalVar : "\'xyz\'"'
        else:
            line = "  exampleLocalVar : 'xyz'"
        self.assertIn(line, linesWithVars)
    else:
        self.assertEqual([], linesWithVars)
        self.assertIn(' [Capture of Locals and Globals disabled (use captureVars=True)]\n', tb)