Esempio n. 1
0
 def test_truncate_text(self):
     self.assertEqual(utils.truncate_text("ABCDEFGHI", 3), "ABC...")
     self.assertEqual(utils.truncate_text("ABCDEFGHI", 10), "ABCDEFGHI")
Esempio n. 2
0
File: job.py Progetto: jokar/minion
 def repr_result(self, result, maxlen=46):
     # 46 is the length needed to fit
     #     "the quick brown fox jumps over the lazy dog" :)
     return truncate_text(repr(result), maxlen)
Esempio n. 3
0
 def test_truncate_text(self):
     self.assertEqual(utils.truncate_text("ABCDEFGHI", 3), "ABC...")
     self.assertEqual(utils.truncate_text("ABCDEFGHI", 10), "ABCDEFGHI")