Beispiel #1
0
 def test_compress_string_with_long_tail(self):
     self.assertEqual('3ab5ca7b', encode_rle('aaabcccccabbbbbbb'))
Beispiel #2
0
 def test_compress_one_char(self):
     self.assertEqual('a', encode_rle('a'))
Beispiel #3
0
 def test_compress_sting_in_different_registers(self):
     self.assertEqual('3ab4c2CaB', encode_rle('aaabccccCCaB'))
Beispiel #4
0
 def test_compress_empty_string(self):
     self.assertEqual('', encode_rle(''))
Beispiel #5
0
 def test_compress_sting_in_lower(self):
     self.assertEqual('3ab2cb', encode_rle('aaabccb'))
Beispiel #6
0
 def test_compress_sting_in_uppercase(self):
     self.assertEqual('3AB2CB', encode_rle('AAABCCB'))
Beispiel #7
0
 def test_compress_string_with_contains_same_letters_on_start_and_end(self):
     self.assertEqual('b9a2b', encode_rle('baaaaaaaaabb'))
Beispiel #8
0
 def test_compress_string_of_same_letters(self):
     self.assertEqual('9a', encode_rle('aaaaaaaaa'))