#NEWLINE# def test_postClassCleanupWithPendingCallErrors( self ) : #NEWLINE# #INDENT# '\n        The post-class cleanup method call C{addError} on the result with a\n        L{DirtyReactorAggregateError} Failure if there are pending calls.\n        ' #NEWLINE# delayedCall = DelayedCall ( 300 , ( lambda : None ) , ( ) , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , ( lambda x : None ) , ( lambda x : None ) , seconds = ( lambda : 0 ) ) #NEWLINE# delayedCallString = str ( delayedCall ) #NEWLINE# reactor = StubReactor ( [ delayedCall ] , [ ] ) #NEWLINE# test = object ( ) #NEWLINE# reporter = StubErrorReporter ( ) #NEWLINE# jan = _Janitor ( test , reporter , reactor = reactor ) #NEWLINE# jan . postClassCleanup ( ) #NEWLINE# self . assertEquals ( len ( reporter . errors ) , 1 ) #NEWLINE# self . assertEquals ( reporter . errors [ 0 ] [ 1 ] . value . delayedCalls , [ delayedCallString ] )