Skip to content

Commit 2f28517

Browse files
committed
more tests
1 parent 2b4e56e commit 2f28517

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

opentree/test/test_induced_synth.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,12 @@ def test_success_node_ids(self):
2121
def test_success_mixed_ids(self):
2222
OT.synth_induced_tree(node_ids=['ott770315'], ott_ids=[417950])
2323

24+
class TestSynthNodeInfo(object):
25+
"""docstring for TestSynthNodeInfo"""
26+
def test_synth_node_info(self):
27+
resp = OT.synth_node_info(node_id='mrcaott354607ott374748')
28+
assert resp.response_dict['supported_by'] == {'ot_1344@Tr105486': 'Tn16531763'}
29+
30+
2431
if __name__ == '__main__':
2532
unittest.main()

opentree/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55

66
_TAXONOMY_WIKI_URL = "https://github.com/OpenTreeOfLife/reference-taxonomy/wiki"
7-
_TAXON_FLAGS_WIKI_URL = "{}/Taxon-flags"
7+
_TAXON_FLAGS_WIKI_URL = "{}/Taxon-flags".format(_TAXONOMY_WIKI_URL)
88
_SUPPRESSED_TAXON_FLAGS_WIKI_URL = _TAXON_FLAGS_WIKI_URL + '#flags-leading-to-taxa-being-unavailable-for-tnrs'
99

1010

@@ -37,7 +37,7 @@ def _create_link_from_node_info_conf_key_value_pair(key, value):
3737
return "https://tree.opentreeoflife.org/taxonomy/browse?id={}".format(value)
3838
study_id, tree_id = key.split('@')
3939
node_id = str(value)
40-
if node_id.startswith('ott'):
40+
if node_id.startswith('ott'): ##todo Check if link is possible
4141
logging.debug("node highlighting will not work for ({}, {}, {})\n".format(study_id, tree_id, node_id))
4242
# # This node does not occur in the input tree, it is a result of exemplification...
4343
# # link to its parent node in the input study

0 commit comments

Comments
 (0)