21 lines
470 B
Python
21 lines
470 B
Python
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 make_site(tmp_path):
|
|
def _make(name, **kwargs):
|
|
site_dir = tmp_path / name
|
|
shutil.copytree(
|
|
DATA_SITES / name,
|
|
site_dir,
|
|
ignore=shutil.ignore_patterns("output", "build.log"),
|
|
)
|
|
return Site(site_dir, **kwargs)
|
|
|
|
return _make
|