nwb-linkml/nwb-schema-linkml/tests/test_data.py

23 lines
595 B
Python
Raw Normal View History

2023-08-16 23:07:36 +00:00
"""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