Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:

- name: Test built package
run: |
pip install pytest
pip install pytest pytest-cov
pip install ./target
pytest -v pipeline/tests
pytest -v --cov=openminds --cov-report term pipeline/tests
48 changes: 27 additions & 21 deletions pipeline/tests/test_instantiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,39 @@
Tests for openMINDS Python module
"""

from importlib import import_module
import sys

import pytest

from openminds.base import Node, IRI
from openminds.latest import (
chemicals,
computation,
controlled_terms,
core,
ephys,
publications,
sands,
specimen_prep,
stimulation,
)

from utils import build_fake_node

all_modules = (
chemicals,
computation,
controlled_terms,
core,
ephys,
publications,
sands,
specimen_prep,
stimulation,
module_names = (
"chemicals",
"computation",
"controlled_terms",
"core",
"ephys",
"publications",
"sands",
"specimen_prep",
"stimulation",
)
versions = ("v3", "v4", "latest") # "v1" and "v2" currently produce errors

all_modules = []
for version in versions:
for module_name in module_names:
path = f"openminds.{version}.{module_name}"
try:
module = import_module(path)
except ModuleNotFoundError:
continue
else:
sys.modules[path] = module
all_modules.append(module)


def classes_in_module(module):
Expand Down