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))
def test_get_parent_label_part_subpart(self): label_parts = ['1234', 'Subpart', 'A'] self.assertEqual([ '1234', ], get_parent_label(label_parts))
def test_get_parent_label_part_interp(self): label_parts = ['1234', 'Interp'] self.assertEqual([ '1234', ], get_parent_label(label_parts))
def test_get_parent_label_root(self): label_parts = ['1234'] self.assertEqual(None, get_parent_label(label_parts))
def test_get_parent_label_normal(self): label_parts = ['1234', '1', 'g', '2'] self.assertEqual(['1234', '1', 'g'], get_parent_label(label_parts))
def test_get_parent_label_part_subpart(self): label_parts = ['1234', 'Subpart', 'A'] self.assertEqual(['1234', ], get_parent_label(label_parts))
def test_get_parent_label_part_interp(self): label_parts = ['1234', 'Interp'] self.assertEqual(['1234', ], get_parent_label(label_parts))