#NEWLINE# def test_text( env , pad ) : #NEWLINE# #INDENT# field = make_field ( env , 'text' ) #NEWLINE# with Context ( pad = pad ) : #NEWLINE# #INDENT# rv = field . deserialize_value ( '' , pad = pad ) #NEWLINE# assert ( field == '' ) #NEWLINE# rv = field . deserialize_value ( None , pad = pad ) #NEWLINE# assert isinstance ( rv , Undefined ) #NEWLINE# rv = field . deserialize_value ( 'foo\nbar' , pad = pad ) #NEWLINE# assert ( rv == 'foo\nbar' ) #NEWLINE# rv = field . deserialize_value ( ' 123 ' , pad = pad ) #NEWLINE# assert ( rv == ' 123 ' )