#NEWLINE# def test_negative_ttl( self ) : #NEWLINE# #INDENT# for bad_ttl in ( ( - 1 ) , 'ttl' , object ( ) , [ 1 ] , { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# #UNINDENT# } , ( 2 ** 100 ) ) : #NEWLINE# #INDENT# print ( bad_ttl ) #NEWLINE# self . assertRaises ( ArgumentError , self . cb . get , 'key' , ttl = bad_ttl ) #NEWLINE# self . assertRaises ( ArgumentError , self . cb . set , 'key' , 'value' , ttl = bad_ttl ) #NEWLINE# self . assertRaises ( ArgumentError , self . cb . touch , 'key' , ttl = bad_ttl ) #NEWLINE# self . assertRaises ( ArgumentError , self . cb . counter , 'key' , ttl = bad_ttl ) #NEWLINE# self . assertRaises ( ArgumentError , self . cb . lock , 'key' , ttl = bad_ttl ) #NEWLINE# self . assertRaises ( ArgumentError , self . cb . get_multi , [ 'key' ] , ttl = bad_ttl ) #NEWLINE# self . assertRaises ( ArgumentError , self . cb . get_multi , { #NEWLINE# #INDENT# 'key' : { #NEWLINE# #INDENT# 'ttl' : bad_ttl , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertRaises ( ArgumentError , self . cb . get_multi , { #NEWLINE# #INDENT# 'key' : bad_ttl , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertRaises ( ArgumentError , self . cb . counter_multi , 'key' , ttl = bad_ttl ) #NEWLINE# self . assertRaises ( ArgumentError , self . cb . lock_multi , 'key' , ttl = bad_ttl )