#NEWLINE# def test_value_in( ) : #NEWLINE# #INDENT# v = ValueIn ( ( 'a' , 'b' , 'c' ) ) #NEWLINE# for good_val in ( 'a' , 'b' , 'c' ) : #NEWLINE# #INDENT# s = scalar ( good_val ) #NEWLINE# assert v . validate ( s , None ) #NEWLINE# #UNINDENT# for bad_val in ( None , 'x' , ( - 1 ) ) : #NEWLINE# #INDENT# s = scalar ( bad_val ) #NEWLINE# assert ( not v . validate ( s , None ) )