コード例 #1
0
 def test_not_truncate(self):
     string = "A" * 10
     new_string = trunc(string, 20)
     self.assertEqual(len(new_string), 10)
コード例 #2
0
 def test_not_truncate(self):
     string = "A" * 10
     new_string = trunc(string, 20)
     self.assertEqual(len(new_string), 10)
コード例 #3
0
 def test_truncate(self):
     string = "A" * 10
     new_string = trunc(string, 5)
     self.assertLess(len(new_string), 6)
コード例 #4
0
 def test_truncate(self):
     string = "A" * 10
     new_string = trunc(string, 5)
     self.assertLess(len(new_string), 6)