From e4c18217e06ff99904c783c49d29459347b0237a Mon Sep 17 00:00:00 2001 From: Haibao Tang Date: Mon, 23 Sep 2024 09:28:26 -0700 Subject: [PATCH] Add test_i304_regulates.py --- tests/test_i304_regulates.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/test_i304_regulates.py diff --git a/tests/test_i304_regulates.py b/tests/test_i304_regulates.py new file mode 100644 index 0000000..1ea0389 --- /dev/null +++ b/tests/test_i304_regulates.py @@ -0,0 +1,15 @@ +from goatools.gosubdag.gosubdag import GoSubDag +from goatools.obo_parser import GODag + + +def test_i304_regulates(): + godag = GODag("go-basic.obo", optional_attrs=["relationship"]) + optional_relationships = { + "regulates", + "negatively_regulates", + "positively_regulates", + } + anc = GoSubDag( + ["GO:0019222"], godag, optional_relationships, prt=None + ).rcntobj.go2ancestors["GO:0019222"] + assert len(anc) == 4