Skip to content

Commit 1206649

Browse files
committed
Fix tests.
The new RDF converter revealed several issues with our existing tests, which are fixed here. * test_convert.py (test_to_rdf_hydrated): That test used an incorrect "NOT" value for a predicate modifier slot (the correct value is "Not", and there is nothing in the spec to suggest it is case-insensitive); it also forgot to declare some prefixes; * test_writers.py (test_rdflib_endpoint): That test used "sssom:MappingCuration" as a column name in a MappingSetDataFrame, instead of the expected "mapping_justification"; it also forgot to declare some prefixes.
1 parent 4c13e89 commit 1206649

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

tests/test_convert.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def test_to_rdf_hydrated(self) -> None:
126126
"skos:exactMatch",
127127
"HP:0003348",
128128
SEMAPV.ManualMappingCuration.value,
129-
"NOT",
129+
"Not",
130130
),
131131
(
132132
"mesh:C563052",
@@ -158,6 +158,8 @@ def test_to_rdf_hydrated(self) -> None:
158158
"UMLS": "https://uts.nlm.nih.gov/uts/umls/concept/",
159159
"mesh": "http://id.nlm.nih.gov/mesh/",
160160
"sssom": "https://w3id.org/sssom/",
161+
"skos": "http://www.w3.org/2004/02/skos/core#",
162+
"semapv": "https://w3id.org/semapv/vocab/",
161163
}
162164
)
163165
msdf = MappingSetDataFrame(df, converter=converter)

tests/test_writers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from sssom import MappingSetDataFrame
1414
from sssom.constants import (
1515
CREATOR_ID,
16+
MAPPING_JUSTIFICATION,
1617
OBJECT_ID,
1718
OBJECT_LABEL,
1819
PREDICATE_ID,
@@ -203,13 +204,15 @@ def test_rdflib_endpoint(self) -> None:
203204
SUBJECT_ID,
204205
PREDICATE_ID,
205206
OBJECT_ID,
206-
SEMAPV.ManualMappingCuration.value,
207+
MAPPING_JUSTIFICATION,
207208
]
208209
df = pd.DataFrame(rows, columns=columns)
209210
converter = curies.Converter.from_prefix_map(
210211
{
211212
"DOID": "http://purl.obolibrary.org/obo/DOID_",
212213
"UMLS": "https://uts.nlm.nih.gov/uts/umls/concept/",
214+
"skos": "http://www.w3.org/2004/02/skos/core#",
215+
"semapv": "https://w3id.org/semapv/vocab/",
213216
}
214217
)
215218
msdf = MappingSetDataFrame(df, converter=converter)

0 commit comments

Comments
 (0)