예제 #1
0
 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...')
예제 #2
0
 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'…')
예제 #3
0
 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'…')
예제 #4
0
 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...')