def test_go_rule02(): assoc = make_annotation(qualifier="NOT", goid="GO:0005515").associations[0] test_result = qc.GoRule02().test(assoc, all_rules_config()) assert test_result.result_type == qc.ResultType.WARNING assoc.negated = False test_result = qc.GoRule02().test(assoc, all_rules_config()) assert test_result.result_type == qc.ResultType.PASS assoc.negated = True assoc.object.id = Curie.from_str("GO:0003674") test_result = qc.GoRule02().test(assoc, all_rules_config()) assert test_result.result_type == qc.ResultType.PASS
def test_go_rule02(): a = ["blah"] * 16 a[3] = "NOT" a[4] = "GO:0005515" test_result = qc.GoRule02().test(a, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.WARNING a[3] = "" test_result = qc.GoRule02().test(a, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.PASS a[3] = "NOT" a[4] = "GO:0003674" test_result = qc.GoRule02().test(a, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.PASS
def test_go_rule02(): a = ["blah"] * 15 a[3] = "NOT" a[4] = "GO:0005515" a[8] = "F" assoc = gafparser.to_association(a).associations[0] test_result = qc.GoRule02().test(assoc, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.WARNING assoc.negated = False test_result = qc.GoRule02().test(assoc, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.PASS assoc.negated = True assoc.object.id = "GO:0003674" test_result = qc.GoRule02().test(assoc, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.PASS