This commit is contained in:
2019-09-18 17:35:57 -04:00
parent 2f5fd317e9
commit 8dbddb1ec2
2 changed files with 25 additions and 2 deletions
+25 -2
View File
@@ -1,12 +1,11 @@
import os
os.environ["PYTHONUNBUFFERED"] = "1"
os.environ.pop("BAKEFILE_PATH", "")
import pytest
import delegator
import bake.cli as bake_cli
@pytest.fixture
def bake():
@@ -30,3 +29,27 @@ def bake():
return c
return run
@pytest.fixture
def bake_i():
def run(*args, fixture="default", assert_ok=True, block=True):
bakefile = os.path.join(
os.path.dirname(__file__), "fixtures", f"{fixture}.Bakefile"
)
cmd = " ".join(["bake", "-i", "-b", bakefile] + list(args))
print(f"$ {cmd}")
c = delegator.run(cmd, block=block)
if block and assert_ok:
assert c.return_code == 0
if block:
print(c.out)
print(c.err)
return c
return run
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB