def test_gorule30(): assoc = make_annotation(references="GO_REF:0000033").associations[0] config = assocparser.AssocParserConfig(goref_metadata={ "goref-0000033": { "authors": "Pascale Gaudet, Michael Livstone, Paul Thomas, The Reference Genome Project", "id": "GO_REF:0000033", "is_obsolete": True } }, rule_set=assocparser.RuleSet.ALL) test_result = qc.GoRule30().test(assoc, config) assert test_result.result_type == qc.ResultType.WARNING assoc.evidence.has_supporting_reference = [ Curie.from_str("GO_PAINT:0000000") ] test_result = qc.GoRule30().test(assoc, config) assert test_result.result_type == qc.ResultType.WARNING assoc.evidence.has_supporting_reference = [ Curie.from_str("FOO:123"), Curie.from_str("GO_REF:0000033") ] test_result = qc.GoRule30().test(assoc, config) assert test_result.result_type == qc.ResultType.WARNING assoc.evidence.has_supporting_reference = [Curie.from_str("FOO:123")] test_result = qc.GoRule30().test(assoc, config) assert test_result.result_type == qc.ResultType.PASS
def test_gorule30(): a = ["blah"] * 15 a[3] = "" a[5] = "GO_REF:0000033" a[8] = "P" assoc = gafparser.to_association(a).associations[0] config = assocparser.AssocParserConfig( goref_metadata={ "goref-0000033": { "authors": "Pascale Gaudet, Michael Livstone, Paul Thomas, The Reference Genome Project", "id": "GO_REF:0000033", "is_obsolete": True } }) test_result = qc.GoRule30().test(assoc, config) assert test_result.result_type == qc.ResultType.WARNING assoc.evidence.has_supporting_reference = ["GO_PAINT:0000000"] test_result = qc.GoRule30().test(assoc, config) assert test_result.result_type == qc.ResultType.WARNING assoc.evidence.has_supporting_reference = ["FOO:123", "GO_REF:0000033"] test_result = qc.GoRule30().test(assoc, config) assert test_result.result_type == qc.ResultType.WARNING assoc.evidence.has_supporting_reference = ["FOO:123"] test_result = qc.GoRule30().test(assoc, config) assert test_result.result_type == qc.ResultType.PASS
def test_gorule30(): a = ["blah"] * 16 a[5] = "GO_REF:0000033" config = assocparser.AssocParserConfig( goref_metadata={ "goref-0000033": { "authors": "Pascale Gaudet, Michael Livstone, Paul Thomas, The Reference Genome Project", "id": "GO_REF:0000033", "is_obsolete": True } }) test_result = qc.GoRule30().test(a, config) assert test_result.result_type == qc.ResultType.ERROR a[5] = "GO_PAINT:0000000" test_result = qc.GoRule30().test(a, config) assert test_result.result_type == qc.ResultType.ERROR a[5] = "FOO:123|GO_REF:0000033" test_result = qc.GoRule30().test(a, config) assert test_result.result_type == qc.ResultType.ERROR a[5] = "FOO:123" test_result = qc.GoRule30().test(a, config) assert test_result.result_type == qc.ResultType.PASS
def test_gorule30(): a = ["blah"] * 16 a[5] = "GO_REF:0000033" test_result = qc.GoRule30().test(a, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.ERROR a[5] = "GO_PAINT:0000000" test_result = qc.GoRule30().test(a, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.ERROR a[5] = "FOO:123|GO_REF:0000033" test_result = qc.GoRule30().test(a, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.ERROR a[5] = "FOO:123" test_result = qc.GoRule30().test(a, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.PASS