Skip to content

Commit fa6d966

Browse files
committed
Fix test to work cross platform
1 parent 02523d9 commit fa6d966

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_utils/test_context_utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import pytest
23

34
from jsonasobj2 import JsonObj, loads
@@ -93,17 +94,18 @@ def test_merge_contexts_base():
9394
@pytest.mark.parametrize(
9495
("imp", "result"),
9596
[
96-
("linkml:types", r"C:\temp\linkml_model\model\schema\types"),
97-
("ex_file", "C:\\temp\\example\\schema"),
97+
("linkml:types", f"C:\\temp\\linkml_model\\model\\schema{os.sep}types"),
98+
("ex_file", "/tmp/example/schema"),
9899
("_types", "https://w3id.org/linkml/types"),
99100
],
100101
)
101102
def test_map_import(imp, result):
102103
importmap = {
103104
"linkml:": "C:\\temp\\linkml_model\\model\\schema",
104-
"ex_file": "C:\\temp\\example\\schema",
105+
"ex_file": "/tmp/example/schema",
105106
"_types": "linkml:types",
106107
}
108+
107109
def namespaces():
108110
ns = Namespaces()
109111
ns["linkml"] = URIRef("https://w3id.org/linkml/")

0 commit comments

Comments
 (0)