def test_truncate_chars(self): result = truncate_chars('peter bengtsson', 11) eq_(result, 'peter be...') result = truncate_chars('peter bengtsson', 10) eq_(result, 'peter b...') result = truncate_chars('peter bengtsson', 9) eq_(result, 'peter...')
def test_truncate_chars(self): result = truncate_chars('peter bengtsson', 11) eq_(result, 'peter beng' + u'…') result = truncate_chars('peter bengtsson', 10) eq_(result, 'peter ben' + u'…') result = truncate_chars('peter bengtsson', 7) eq_(result, 'peter' + u'…')