예제 #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])