Files
fastapi-chameleon/tests/conftest.py
2024-11-07 00:40:09 -08:00

19 lines
382 B
Python

from pathlib import Path
import pytest
import fastapi_chameleon as fc
@pytest.fixture
def test_templates_path(pytestconfig):
return Path(pytestconfig.rootdir, 'tests', 'templates')
@pytest.fixture
def setup_global_template(test_templates_path):
fc.global_init(str(test_templates_path))
yield
# Clear paths so as to no affect future tests
fc.engine.clear()