nwb-linkml/nwb_linkml/tests/conftest.py
2024-07-02 00:01:54 -07:00

21 lines
540 B
Python

import os
from doctest import ELLIPSIS, NORMALIZE_WHITESPACE
import pytest
from sybil import Sybil
from sybil.parsers.rest import DocTestParser, PythonCodeBlockParser
from .fixtures import * # noqa: F403
pytest_collect_file = Sybil(
parsers=[
DocTestParser(optionflags=ELLIPSIS + NORMALIZE_WHITESPACE),
PythonCodeBlockParser(),
],
patterns=["*.py"],
).pytest()
@pytest.fixture(autouse=True, scope="session")
def set_config_vars(tmp_output_dir):
os.environ["NWB_LINKML_CACHE_DIR"] = str(tmp_output_dir)