示例#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])