Exemple #1
0
 def test_equal_1(self):
     self.assertEqual(
         shorten('The quick brown fox jumps over the lazy dog', 27),
         'The quick br...the lazy dog')
Exemple #2
0
 def test_equal_4(self):
     self.assertEqual(shorten('hello world', 6, '....'), 'h....d')
Exemple #3
0
 def test_equal_5(self):
     self.assertEqual(shorten('hello', 7), 'hello')
Exemple #4
0
 def test_equal_2(self):
     self.assertEqual(
         shorten('The quick brown fox jumps over the lazy dog', 27, '----'),
         'The quick b----the lazy dog')
Exemple #5
0
 def test_equal_3(self):
     self.assertEqual(shorten('hello world', 5, '....'), 'hello')
 def test_equal_1(self):
     self.assertEqual(shorten(
         'The quick brown fox jumps over the lazy dog', 27
     ), 'The quick br...the lazy dog')
 def test_equal_5(self):
     self.assertEqual(shorten('hello', 7), 'hello')
 def test_equal_4(self):
     self.assertEqual(shorten('hello world', 6, '....'), 'h....d')
 def test_equal_3(self):
     self.assertEqual(shorten('hello world', 5, '....'), 'hello')
 def test_equal_2(self):
     self.assertEqual(shorten(
         'The quick brown fox jumps over the lazy dog', 27, '----'
     ), 'The quick b----the lazy dog')