nwb-linkml/nwb_linkml/tests/conftest.py

20 lines
501 B
Python
Raw Normal View History

import os
from doctest import ELLIPSIS, NORMALIZE_WHITESPACE
2024-07-02 04:44:35 +00:00
import pytest
from sybil import Sybil
from sybil.parsers.rest import DocTestParser, PythonCodeBlockParser
pytest_collect_file = Sybil(
parsers=[
DocTestParser(optionflags=ELLIPSIS + NORMALIZE_WHITESPACE),
PythonCodeBlockParser(),
],
2024-07-02 04:23:31 +00:00
patterns=["*.py"],
).pytest()
2024-07-02 04:23:31 +00:00
@pytest.fixture(autouse=True, scope="session")
def set_config_vars(tmp_output_dir):
2024-07-02 04:23:31 +00:00
os.environ["NWB_LINKML_CACHE_DIR"] = str(tmp_output_dir)