Skip to content

Commit

Permalink
fixed failing unit tests as a result of modifying the test ontologies
Browse files Browse the repository at this point in the history
  • Loading branch information
mdorf committed Nov 21, 2024
1 parent e9650d9 commit 0598b9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test/models/test_ontology.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def test_ontology_properties
ont.bring(:submissions)
sub = ont.submissions[0]
props = ont.properties()
assert_equal 82, props.length
assert_equal 85, props.length

# verify sorting
assert_equal "http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#AlgorithmPurpose", props[0].id.to_s
Expand Down Expand Up @@ -192,7 +192,7 @@ def test_ontology_properties

# test property roots
pr = ont.property_roots(sub, extra_include=[:hasChildren, :children])
assert_equal 61, pr.length
assert_equal 64, pr.length

# verify sorting
assert_equal "http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#AlgorithmPurpose", pr[0].id.to_s
Expand All @@ -206,7 +206,7 @@ def test_ontology_properties
assert_equal 33, dpr.length
# count annotation properties
apr = pr.select { |p| p.class == LinkedData::Models::AnnotationProperty }
assert_equal 10, apr.length
assert_equal 13, apr.length
# check for non-root properties
assert_empty pr.select { |p| ["http://www.w3.org/2004/02/skos/core#broaderTransitive",
"http://www.w3.org/2004/02/skos/core#topConceptOf",
Expand Down
6 changes: 3 additions & 3 deletions test/models/test_ontology_submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def test_index_properties
"./test/data/ontology_files/BRO_v3.5.owl", 1,
process_rdf: true, extract_metadata: false, index_properties: true)
res = LinkedData::Models::Class.search("*:*", {:fq => "submissionAcronym:\"BRO\"", :start => 0, :rows => 80}, :property)
assert_equal 80 , res["response"]["numFound"]
assert_equal 83 , res["response"]["numFound"]
found = 0

res["response"]["docs"].each do |doc|
Expand Down Expand Up @@ -1139,7 +1139,7 @@ def test_submission_metrics
metrics.bring_remaining
assert_instance_of LinkedData::Models::Metric, metrics

assert_includes [481, 486], metrics.classes # 486 if owlapi imports skos classes
assert_includes [481, 487], metrics.classes # 486 if owlapi imports skos classes
assert_includes [63, 45], metrics.properties # 63 if owlapi imports skos properties
assert_equal 124, metrics.individuals
assert_includes [13, 14], metrics.classesWithOneChild # 14 if owlapi imports skos properties
Expand All @@ -1161,7 +1161,7 @@ def test_submission_metrics
metrics.bring_remaining

#all the child metrics should be 0 since we declare it as flat
assert_equal 486, metrics.classes
assert_equal 487, metrics.classes
assert_equal 63, metrics.properties
assert_equal 124, metrics.individuals
assert_equal 0, metrics.classesWithOneChild
Expand Down

0 comments on commit 0598b9f

Please sign in to comment.