SPB Git

spb/countryatlas

Public
553 B · 24 lines python
1"""Shared fixtures: every test gets an isolated CA data dir (settings is a process-wide singleton → patched)."""2from __future__ import annotations34from pathlib import Path56import pytest78from countryatlas.config import settings910FIXTURES = Path(__file__).parent / "fixtures"111213@pytest.fixture()14def data_dir(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> Path:15    d = tmp_path / "ca-data"16    monkeypatch.setattr(settings, "data_dir", d)17    settings.ensure_dirs()18    return d192021@pytest.fixture()22def fixtures() -> Path:23    return FIXTURES24
Files · b828cc86d5b2223081f42e670e6d1f2379c43230
Menu

Theme