SPB Git forge

spb/countryatlas

Public
20commits 1branches 0releases
268.3 MBsize
maindefault branch
12 days agolast push
TypeScript 57% Python 38.6% JavaScript 3.6% CSS 0.6%
553 B · 24 lines python
Raw Blame History
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