#NEWLINE# def test_counter( self ) : #NEWLINE# #INDENT# counter_a = db . counter ( 'counter-a' ) #NEWLINE# counter_b = db . counter ( 'counter-b' ) #NEWLINE# self . assertEqual ( counter_a . value ( ) , 0 ) #NEWLINE# self . assertEqual ( counter_a . incr ( ) , 1 ) #NEWLINE# self . assertEqual ( counter_a . incr ( 3 ) , 4 ) #NEWLINE# self . assertEqual ( counter_a . value ( ) , 4 ) #NEWLINE# self . assertEqual ( counter_b . value ( ) , 0 ) #NEWLINE# counter_b += 3 #NEWLINE# self . assertEqual ( counter_b . value ( ) , 3 ) #NEWLINE# counter_b = ( counter_b + self ) #NEWLINE# self . assertEqual ( counter_b . value ( ) , 7 ) #NEWLINE# counter_b = ( counter_b - 5 ) #NEWLINE# self . assertEqual ( counter_b . value ( ) , 2 )