#NEWLINE# def test_value_at_most( ) : #NEWLINE# #INDENT# i = integer_scalar ( 1 ) #NEWLINE# V = ValueAtMost #NEWLINE# assert V ( 2 ) . validate ( V , None ) #NEWLINE# assert V ( 1 ) . validate ( i , None ) #NEWLINE# assert ( not V ( 0 ) . validate ( i , None ) ) #NEWLINE# assert ( i . errors == [ 'test must be less than or equal to 0.' ] )