2023-10-20 04:20:50 +00:00
|
|
|
import os
|
|
|
|
from doctest import ELLIPSIS, NORMALIZE_WHITESPACE
|
|
|
|
|
2024-07-02 04:44:35 +00:00
|
|
|
import pytest
|
2023-10-20 04:20:50 +00:00
|
|
|
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"],
|
2023-10-20 04:20:50 +00:00
|
|
|
).pytest()
|
|
|
|
|
2024-07-02 04:23:31 +00:00
|
|
|
|
|
|
|
@pytest.fixture(autouse=True, scope="session")
|
2023-10-20 04:20:50 +00:00
|
|
|
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)
|