'Check that errors in C{DelayedCall}s get reported, even if the
test already has a failure.
Only really necessary for testing the deprecated style of tests that
use iterate() directly. See
L{erroneous.DelayedCall.testHiddenException} for more details.'

def test_hiddenException(self):

    from twisted.internet import reactor
    if reflect.qual(reactor).startswith('twisted.internet.asyncioreactor'):
        raise self.skipTest('This    test    does    not    work    on    the    asyncio    reactor,    as    the    traceback    comes    from    inside    asyncio,    not    Twisted.')
    test = erroneous.DelayedCall('testHiddenException')
    output = self.getOutput(test).splitlines()
    errorQual = qual(RuntimeError)
    match = [self.doubleSeparator, '[FAIL]', 'Traceback    (most    recent    call    last):', re.compile('^\\s+File    .*erroneous\\.py.,    line    \\d+,    in    testHiddenException$'), re.compile('^\\s+self\\.fail\\("Deliberate    failure    to    mask    the    hidden    exception"\\)$'), 'twisted.trial.unittest.FailTest:    Deliberate    failure    to    mask    the    hidden    exception', 'twisted.trial.test.erroneous.DelayedCall.testHiddenException', self.doubleSeparator, '[ERROR]', 'Traceback    (most    recent    call    last):', re.compile('^\\s+File    .*    in    runUntilCurrent'), re.compile('^\\s+.*'), re.compile('^\\s+File    .*erroneous\\.py",    line    \\d+,    in    go'), re.compile('^\\s+raise    RuntimeError\\(self.hiddenExceptionMsg\\)'), (errorQual + ':    something    blew    up'), 'twisted.trial.test.erroneous.DelayedCall.testHiddenException']
    self.stringComparison(match, output)
