Esempio n. 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')
Esempio n. 2
0
 def test_equal_4(self):
     self.assertEqual(shorten('hello world', 6, '....'), 'h....d')
Esempio n. 3
0
 def test_equal_5(self):
     self.assertEqual(shorten('hello', 7), 'hello')
Esempio n. 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')
Esempio n. 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')