File size: 434 Bytes
85b8b70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os
from pathlib import Path
import pytest


@pytest.fixture
def project_root() -> Path:
    return Path(__file__).resolve().parent.parent


@pytest.fixture
def cache_dir(project_root: Path) -> Path:
    uv_cache = os.environ.get("UV_CACHE_DIR")
    if uv_cache:
        uv_lrr_cache = Path(uv_cache) / "lrr-upstream"
        if uv_lrr_cache.exists():
            return uv_lrr_cache
    return project_root / ".cache/upstream"