Пример #1
0
 def test_none(self):
     result = get_partition_labels(None)
     self.assertEqual(result, [])
Пример #2
0
 def test_empty(self):
     result = get_partition_labels('')
     self.assertEqual(result, [])
Пример #3
0
 def test_given(self):
     result = get_partition_labels("ababcbacadefegdehijhklij")
     self.assertEqual(result, [9, 7, 8])
Пример #4
0
 def test_simple_5(self):
     result = get_partition_labels("abbcccbb")
     self.assertEqual(result, [1, 7])
Пример #5
0
 def test_simple_4(self):
     result = get_partition_labels("abbcccbba")
     self.assertEqual(result, [9])
Пример #6
0
 def test_simple_3(self):
     result = get_partition_labels("abbccc")
     self.assertEqual(result, [1, 2, 3])
Пример #7
0
 def test_simple_2(self):
     result = get_partition_labels("abc")
     self.assertEqual(result, [1, 1, 1])