예제 #1
0
 def test_leftoverPendingCalls(self):
     """
     Trial reports a L{util.DirtyReactorAggregateError} and fails the test
     if a test leaves a L{DelayedCall} hanging.
     """
     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))
예제 #2
0
 def testLeftoverPendingCalls(self):
     suite = erroneous.ReactorCleanupTests('test_leftoverPendingCalls')
     suite.run(self.result)
     self.assert_(self.result.cleanerrs)
     self.assert_(isinstance(self.result.cleanerrs.value,
                             util.PendingTimedCallsError))