| Total Complexity | 1 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import pytest |
||
| 2 | |||
| 3 | from mandos.cli import Commands |
||
| 4 | from mandos.search.chembl.go_search import GoType |
||
| 5 | |||
| 6 | from .. import get_test_resource |
||
| 7 | |||
| 8 | |||
| 9 | class TestGoSearch: |
||
| 10 | def test_find(self): |
||
| 11 | df, triples = Commands.go_search(get_test_resource("inchis.txt"), GoType.function) |
||
| 12 | assert len(df) == 20 |
||
| 13 | assert len(triples) == 20 |
||
| 14 | # TODO not very complete |
||
| 15 | assert {t.compound_name.lower() for t in triples} == {"alprazolam"} |
||
| 16 | assert {t.predicate for t in triples} == {"has GO function term"} |
||
| 17 | |||
| 18 | |||
| 19 | if __name__ == "__main__": |
||
| 20 | pytest.main() |
||
| 21 |