mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2024-11-12 17:54:29 +00:00
23 lines
595 B
Python
23 lines
595 B
Python
|
"""Data test."""
|
||
|
import os
|
||
|
import glob
|
||
|
import unittest
|
||
|
|
||
|
from linkml_runtime.loaders import yaml_loader
|
||
|
from nwb_schema_language.datamodel.nwb_schema_language import Namespaces
|
||
|
|
||
|
ROOT = os.path.join(os.path.dirname(__file__), '..')
|
||
|
DATA_DIR = os.path.join(ROOT, "src", "data", "examples")
|
||
|
|
||
|
EXAMPLE_FILES = glob.glob(os.path.join(DATA_DIR, '*.yaml'))
|
||
|
|
||
|
|
||
|
class TestData(unittest.TestCase):
|
||
|
"""Test data and datamodel."""
|
||
|
|
||
|
def test_data(self):
|
||
|
"""Date test."""
|
||
|
for path in EXAMPLE_FILES:
|
||
|
obj = yaml_loader.load(path, target_class=Namespaces)
|
||
|
assert obj
|