def test_truncate():
 assert (truncate('1234567890', 50) == '1234567890')
 assert (truncate('1234567890', 5) == u('1234\xe2\x80\xa6'))
 assert (truncate('1234567890', 1) == u('\xe2\x80\xa6'))
 assert (truncate('1234567890', 9) == u('12345678\xe2\x80\xa6'))
 assert (truncate('1234567890', 10) == '1234567890')
 assert (truncate('1234567890', 0) == '1234567890')
 assert (truncate('1234567890', (-1)) == '1234567890')

def test_truncate ( ) : assert ( truncate ( '1234567890' , 50 ) == '1234567890' ) assert ( truncate ( '1234567890' , 5 ) == u ( '1234\xe2\x80\xa6' ) ) assert ( truncate ( '1234567890' , 1 ) == u ( '\xe2\x80\xa6' ) ) assert ( truncate ( '1234567890' , 9 ) == u ( '12345678\xe2\x80\xa6' ) ) assert ( truncate ( '1234567890' , 10 ) == '1234567890' ) assert ( truncate ( '1234567890' , 0 ) == '1234567890' ) assert ( truncate ( '1234567890' , ( - 1 ) ) == '1234567890' )
test truncate function .