mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2024-11-10 00:34:29 +00:00
sneakers-the-rat
50e816bad4
Need to make a proxytable model like proxyarray because reading all these tables takes way too fuckin long and it's not what we want to do anyway.
34 lines
812 B
Python
34 lines
812 B
Python
import pytest
|
|
import os
|
|
|
|
from nwb_linkml.io import schema as io
|
|
from nwb_linkml.adapters.namespaces import NamespacesAdapter
|
|
import shutil
|
|
from pathlib import Path
|
|
|
|
@pytest.fixture(scope="session")
|
|
def tmp_output_dir() -> Path:
|
|
path = Path(__file__).parent.resolve() / '__tmp__'
|
|
if path.exists():
|
|
shutil.rmtree(str(path))
|
|
path.mkdir()
|
|
|
|
return path
|
|
|
|
@pytest.fixture(autouse=True, scope='session')
|
|
def set_config_vars(tmp_output_dir):
|
|
os.environ['NWB_LINKML_CACHE_DIR'] = str(tmp_output_dir)
|
|
|
|
|
|
|
|
@pytest.fixture(scope="session")
|
|
def nwb_core_fixture() -> NamespacesAdapter:
|
|
nwb_core = io.load_nwb_core()
|
|
nwb_core.populate_imports()
|
|
return nwb_core
|
|
|
|
|
|
@pytest.fixture(scope="session")
|
|
def data_dir() -> Path:
|
|
path = Path(__file__).parent.resolve() / 'data'
|
|
return path
|