Пример #1
0
 def test_correct_three(self):
     string = 'aabcccccaaab'
     self.assertEqual('a2b1c5a3b1', strcompression.compress(string))
Пример #2
0
 def test_base(self):
     string = 'x'
     self.assertEqual('x1', strcompression.compress(string))
Пример #3
0
 def test_correct_two(self):
     string = 'aabbc'
     self.assertEqual('a2b2c1', strcompression.compress(string))
Пример #4
0
 def test_empty(self):
     string = ''
     self.assertRaises(ValueError, lambda: strcompression.compress(string))