コード例 #1
0
    def test_get_parent_label_interps(self):
        label_parts = ['1234', '1', 'g', '2', 'Interp']
        self.assertEqual(['1234', '1', 'g', 'Interp'],
                         get_parent_label(label_parts))

        label_parts = ['1234', '1', 'g', '2', 'Interp', '2']
        self.assertEqual(['1234', '1', 'g', '2', 'Interp'],
                         get_parent_label(label_parts))
コード例 #2
0
    def test_get_parent_label_interps(self):
        label_parts = ['1234', '1', 'g', '2', 'Interp']
        self.assertEqual(['1234', '1', 'g', 'Interp'],
                         get_parent_label(label_parts))

        label_parts = ['1234', '1', 'g', '2', 'Interp', '2']
        self.assertEqual(['1234', '1', 'g', '2', 'Interp'],
                         get_parent_label(label_parts))
コード例 #3
0
 def test_get_parent_label_part_subpart(self):
     label_parts = ['1234', 'Subpart', 'A']
     self.assertEqual([
         '1234',
     ], get_parent_label(label_parts))
コード例 #4
0
 def test_get_parent_label_part_interp(self):
     label_parts = ['1234', 'Interp']
     self.assertEqual([
         '1234',
     ], get_parent_label(label_parts))
コード例 #5
0
 def test_get_parent_label_root(self):
     label_parts = ['1234']
     self.assertEqual(None, get_parent_label(label_parts))
コード例 #6
0
 def test_get_parent_label_normal(self):
     label_parts = ['1234', '1', 'g', '2']
     self.assertEqual(['1234', '1', 'g'], get_parent_label(label_parts))
コード例 #7
0
 def test_get_parent_label_part_subpart(self):
     label_parts = ['1234', 'Subpart', 'A']
     self.assertEqual(['1234', ],
                      get_parent_label(label_parts))
コード例 #8
0
 def test_get_parent_label_part_interp(self):
     label_parts = ['1234', 'Interp']
     self.assertEqual(['1234', ],
                      get_parent_label(label_parts))
コード例 #9
0
 def test_get_parent_label_root(self):
     label_parts = ['1234']
     self.assertEqual(None, get_parent_label(label_parts))
コード例 #10
0
 def test_get_parent_label_normal(self):
     label_parts = ['1234', '1', 'g', '2']
     self.assertEqual(['1234', '1', 'g'],
                      get_parent_label(label_parts))