@@ -1258,3 +1258,52 @@ def test_get_all_types(toolkit):
12581258def test_get_all_multivalued_slots (toolkit ):
12591259 assert "synonym" in toolkit .get_all_multivalued_slots ()
12601260 assert "id" not in toolkit .get_all_multivalued_slots ()
1261+
1262+
1263+ def test_get_descendants_with_biolink_prefix (toolkit ):
1264+ assert 'noncoding RNA product' in toolkit .get_descendants ("noncoding RNA product" )
1265+ assert 'microRNA' in toolkit .get_descendants ("noncoding RNA product" )
1266+ assert 'siRNA' in toolkit .get_descendants ("noncoding RNA product" )
1267+
1268+ assert 'noncoding RNA product' in toolkit .get_descendants ("biolink:NoncodingRNAProduct" )
1269+ assert 'microRNA' in toolkit .get_descendants ("biolink:NoncodingRNAProduct" )
1270+ assert 'siRNA' in toolkit .get_descendants ("biolink:NoncodingRNAProduct" )
1271+
1272+ assert 'microRNA' in toolkit .get_descendants ("biolink:MicroRNA" )
1273+ assert 'siRNA' in toolkit .get_descendants ("biolink:SiRNA" )
1274+
1275+
1276+ def test_get_element_with_biolink_prefix_edge_cases (toolkit ):
1277+ elem = toolkit .get_element ("biolink:NoncodingRNAProduct" )
1278+ assert elem is not None
1279+ assert elem .name == "noncoding RNA product"
1280+
1281+ elem = toolkit .get_element ("biolink:MicroRNA" )
1282+ assert elem is not None
1283+ assert elem .name == "microRNA"
1284+
1285+ elem = toolkit .get_element ("biolink:SiRNA" )
1286+ assert elem is not None
1287+ assert elem .name == "siRNA"
1288+
1289+ elem = toolkit .get_element ("biolink:gene_fusion_with" )
1290+ assert elem is not None
1291+ assert elem .name == "gene_fusion_with"
1292+
1293+ elem = toolkit .get_element ("biolink:genetic_neighborhood_of" )
1294+ assert elem is not None
1295+ assert elem .name == "genetic_neighborhood_of"
1296+
1297+
1298+ def test_get_parent_with_biolink_prefix (toolkit ):
1299+ parent = toolkit .get_parent ('microRNA' )
1300+ assert parent == 'noncoding RNA product'
1301+
1302+ parent_curie = toolkit .get_parent ('microRNA' , formatted = True )
1303+ assert parent_curie == 'biolink:NoncodingRNAProduct'
1304+
1305+ parent_from_curie = toolkit .get_parent ('biolink:microRNA' )
1306+ assert parent_from_curie == 'noncoding RNA product'
1307+
1308+ parent_from_curie_formatted = toolkit .get_parent ('biolink:microRNA' , formatted = True )
1309+ assert parent_from_curie_formatted == 'biolink:NoncodingRNAProduct'
0 commit comments