move temporary directory to .direnv

This commit is contained in:
Jörg Thalheim
2023-09-27 16:13:04 +02:00
parent 66210d176f
commit e970dcb658
2 changed files with 9 additions and 8 deletions

View File

@@ -4,19 +4,17 @@ from pathlib import Path
import pytest
TEST_ROOT = Path(__file__).parent.resolve()
PROJECT_ROOT = TEST_ROOT.parent
CLAN_CORE_ = os.environ.get("CLAN_CORE")
if CLAN_CORE_:
PROJECT_ROOT = TEST_ROOT.parent.parent.parent
if CLAN_CORE_ := os.environ.get("CLAN_CORE"):
CLAN_CORE = Path(CLAN_CORE_)
else:
CLAN_CORE = PROJECT_ROOT.parent.parent
CLAN_CORE = PROJECT_ROOT
@pytest.fixture(scope="session")
def project_root() -> Path:
"""
Root directory the clan-cli
Root directory the clan-core
"""
return PROJECT_ROOT