#NEWLINE# def test_timeout( self ) : #NEWLINE# #INDENT# '\n        If no result is available, wait(timeout) will throw a TimeoutError.\n        ' #NEWLINE# start = time . time ( ) #NEWLINE# dr = EventualResult ( Deferred ( ) , None ) #NEWLINE# self . assertRaises ( TimeoutError , dr . wait , timeout = 0.03 ) #NEWLINE# self . assertTrue ( ( abs ( ( ( time . time ( ) - start ) - 0.03 ) ) < 0.005 ) )