示例#1
0
 def test_repeated_chars(self):
     self.assertEqual('a1b4c2d1e3',
                      functions.string_compress('abbbbccdeee'))
示例#2
0
 def test_length_one(self):
     self.assertEqual('a1', functions.string_compress('a'))
示例#3
0
 def test_multiple_chars(self):
     self.assertEqual('a1b1c1d1', functions.string_compress('abcd'))
示例#4
0
 def test_empty(self):
     self.assertEqual('', functions.string_compress(''))