1
0
mirror of https://github.com/venthur/blag.git synced 2025-11-25 20:52:43 +00:00

added tests for build and main

This commit is contained in:
Bastian Venthur
2021-03-29 12:40:13 +02:00
parent 6445f31204
commit 72971408b2
2 changed files with 72 additions and 0 deletions

View File

@@ -49,3 +49,20 @@ def tempdir():
for d in 'content', 'build', 'static', 'templates':
mkdir(f'{dir}/{d}')
yield dir
@pytest.fixture
def args(tempdir):
class NameSpace:
def __init__(self, **kwargs):
for name in kwargs:
setattr(self, name, kwargs[name])
args = NameSpace(
input_dir=f'{tempdir}/content',
output_dir=f'{tempdir}/build',
static_dir=f'{tempdir}/static',
template_dir=f'{tempdir}/templates',
)
yield args