import shutil from pathlib import Path import pytest from omicron.ssg.site import Site DATA_SITES = Path(__file__).parent.parent / "data" / "sites" @pytest.fixture def site_dir(tmp_path): def _make(name): path = tmp_path / name shutil.copytree( DATA_SITES / name, path, ignore=shutil.ignore_patterns("output", "build.log"), ) return path return _make @pytest.fixture def make_site(site_dir): def _make(name, **kwargs): return Site(site_dir(name), **kwargs) return _make