Expand tests for Site

This commit is contained in:
2026-09-03 03:47:56 +02:00
parent 1fe2bbd1db
commit 7297adb966
8 changed files with 132 additions and 6 deletions
+13 -5
View File
@@ -7,14 +7,22 @@ DATA_SITES = Path(__file__).parent.parent / "data" / "sites"
@pytest.fixture
def make_site(tmp_path):
def _make(name, **kwargs):
site_dir = tmp_path / name
def site_dir(tmp_path):
def _make(name):
path = tmp_path / name
shutil.copytree(
DATA_SITES / name,
site_dir,
path,
ignore=shutil.ignore_patterns("output", "build.log"),
)
return Site(site_dir, **kwargs)
return path
return _make
@pytest.fixture
def make_site(site_dir):
def _make(name, **kwargs):
return Site(site_dir(name), **kwargs)
return _make