'Trial reports a L{util.DirtyReactorAggregateError} and fails the test
if a test leaves a L{DelayedCall} hanging.'

def test_leftoverPendingCalls(self):

    suite = erroneous.ReactorCleanupTests('test_leftoverPendingCalls')
    suite.run(self.result)
    self.assertFalse(self.result.wasSuccessful())
    failure = self.result.errors[0][1]
    self.assertEqual(self.result.successes, 0)
    self.assertTrue(failure.check(util.DirtyReactorAggregateError))
