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