Expand tests for Site
This commit is contained in:
+13
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user