Ejemplo n.º 1
0
def test_gorule39():
    assoc = make_annotation(db="ComplexPortal", goid="GO:0032991").associations[0]

    test_result = qc.GoRule39().test(assoc, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.ERROR

    assoc.subject.id = association.Curie("FB", "1234")
    test_result = qc.GoRule39().test(assoc, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.PASS

    assoc.subject.id = association.Curie("ComplexPortal", "12345")
    assoc.object.id = association.Curie("GO", "0000023")
    test_result = qc.GoRule39().test(assoc, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.PASS
Ejemplo n.º 2
0
def test_gorule39():
    a = ["blah"] * 16
    a[0] = "ComplexPortal"
    a[4] = "GO:0032991"

    test_result = qc.GoRule39().test(a, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.ERROR

    a[0] = "FB"
    test_result = qc.GoRule39().test(a, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.PASS

    a[0] = "ComplexPortal"
    a[4] = "GO:0000023"
    test_result = qc.GoRule39().test(a, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.PASS
Ejemplo n.º 3
0
def test_gorule39():
    a = ["blah"] * 15
    a[0] = "ComplexPortal"
    a[3] = ""
    a[4] = "GO:0032991"
    a[8] = "C"
    assoc = gafparser.to_association(a).associations[0]

    test_result = qc.GoRule39().test(assoc, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.ERROR

    assoc.subject.id = "FB:1234"
    test_result = qc.GoRule39().test(assoc, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.PASS

    assoc.subject.id = "ComplexPortal:12345"
    assoc.object.id = "GO:0000023"
    test_result = qc.GoRule39().test(assoc, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.PASS