Skip to content

Commit b5d8d09

Browse files
committed
[test_validation.py] Add Test for Property String Dtype Validation
1 parent f24eed3 commit b5d8d09

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

test/test_validation.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import unittest
22
import odml
3+
import os
34
import odml.validation
45
import odml.terminology
56
from . import test_samplefile as samplefile
@@ -206,7 +207,9 @@ def test_load_xml(self):
206207
- Properties with undefined dtypes
207208
"""
208209

209-
doc = odml.load("./resources/integration.xml")
210+
dir_path = os.path.dirname(os.path.realpath(__file__))
211+
path = os.path.join(dir_path, "resources", "integration.xml")
212+
doc = odml.load(path)
210213

211214
sec_test_1_err = False
212215
sec_test_2_err = False
@@ -244,7 +247,9 @@ def test_load_json(self):
244247
- Properties with undefined dtypes
245248
"""
246249

247-
doc = odml.load("./resources/integration.json", "JSON")
250+
dir_path = os.path.dirname(os.path.realpath(__file__))
251+
path = os.path.join(dir_path, "resources", "integration.json")
252+
doc = odml.load(path, "JSON")
248253

249254
sec_test_1_err = False
250255
sec_test_2_err = False
@@ -282,7 +287,9 @@ def test_load_yaml(self):
282287
- Properties with undefined dtypes
283288
"""
284289

285-
doc = odml.load("./resources/integration.yaml", "YAML")
290+
dir_path = os.path.dirname(os.path.realpath(__file__))
291+
path = os.path.join(dir_path, "resources", "integration.yaml")
292+
doc = odml.load(path, "YAML")
286293

287294
sec_test_1_err = False
288295
sec_test_2_err = False

0 commit comments

Comments
 (0)