#NEWLINE# def test_str( self ) : #NEWLINE# #INDENT# '\n        The string representation of a L{DelayedCall} instance, as returned by\n        C{str}, includes the unsigned id of the instance, as well as its state,\n        the function to be called, and the function arguments.\n        ' #NEWLINE# def nothing( ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# dc = DelayedCall ( 12 , nothing , ( 3 , ) , { #NEWLINE# #INDENT# 'A' : 5 , #NEWLINE# #UNINDENT# } , None , None , ( lambda : 1.5 ) ) #NEWLINE# ids = { #NEWLINE# #INDENT# dc : 200 , #NEWLINE# #UNINDENT# } #NEWLINE# def fakeID( obj ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return ids [ obj ] #NEWLINE# #UNINDENT# except ( TypeError , KeyError ) : #NEWLINE# #INDENT# return id ( obj ) #NEWLINE# #UNINDENT# #UNINDENT# self . addCleanup ( setIDFunction , setIDFunction ( self ) ) #NEWLINE# self . assertEqual ( str ( dc ) , '<DelayedCall 0xc8 [10.5s] called=0 cancelled=0 nothing(3, A=5)>' )