#NEWLINE# def test_purge_results( self ) : #NEWLINE# #INDENT# for i in range ( 5 ) : #NEWLINE# #INDENT# self . client [ : ] . apply_sync ( ( lambda : 1 ) ) #NEWLINE# #UNINDENT# time . sleep ( 0.1 ) #NEWLINE# rc2 = clientmod . Client ( profile = 'iptest' ) #NEWLINE# hist = self . client . hub_history ( ) #NEWLINE# ahr = rc2 . get_result ( [ hist [ ( - 1 ) ] ] ) #NEWLINE# ahr . wait ( 10 ) #NEWLINE# self . client . purge_results ( hist [ ( - 1 ) ] ) #NEWLINE# newhist = self . client . hub_history ( ) #NEWLINE# self . assertEquals ( ( len ( newhist ) + 1 ) , len ( hist ) ) #NEWLINE# rc2 . spin ( ) #NEWLINE# rc2 . close ( )