#NEWLINE# def test_integer( env , pad ) : #NEWLINE# #INDENT# field = make_field ( env , 'integer' ) #NEWLINE# with Context ( pad = pad ) : #NEWLINE# #INDENT# rv = field . deserialize_value ( '' , pad = pad ) #NEWLINE# assert isinstance ( rv , BadValue ) #NEWLINE# rv = field . deserialize_value ( None , pad = pad ) #NEWLINE# assert isinstance ( rv , Undefined ) #NEWLINE# rv = field . deserialize_value ( '42' , pad = pad ) #NEWLINE# assert ( rv == 42 ) #NEWLINE# rv = field . deserialize_value ( ' 23 ' , pad = pad ) #NEWLINE# assert ( rv == 23 )