clan-core/pkgs/clan-vm-manager/tests/root.py
Qubasa 0ee8dceee2
Some checks failed
checks / checks (pull_request) Failing after 1m10s
checks / check-links (pull_request) Successful in 21s
checks / checks-impure (pull_request) Successful in 1m46s
clan-vm-manager: Basic pytest framework established
2024-03-22 19:08:35 +01:00

36 lines
653 B
Python

import os
from pathlib import Path
import pytest
TEST_ROOT = Path(__file__).parent.resolve()
PROJECT_ROOT = TEST_ROOT.parent
if CLAN_CORE_ := os.environ.get("CLAN_CORE"):
CLAN_CORE = Path(CLAN_CORE_)
else:
CLAN_CORE = PROJECT_ROOT.parent.parent
@pytest.fixture(scope="session")
def project_root() -> Path:
"""
Root directory the clan-cli
"""
return PROJECT_ROOT
@pytest.fixture(scope="session")
def test_root() -> Path:
"""
Root directory of the tests
"""
return TEST_ROOT
@pytest.fixture(scope="session")
def clan_core() -> Path:
"""
Directory of the clan-core flake
"""
return CLAN_CORE