mirror of
https://github.com/kennethreitz/bake.git
synced 2026-06-05 23:00:17 +00:00
remove tests
This commit is contained in:
@@ -1,55 +0,0 @@
|
||||
import os
|
||||
|
||||
os.environ["PYTHONUNBUFFERED"] = "1"
|
||||
os.environ.pop("BAKEFILE_PATH", "")
|
||||
|
||||
import pytest
|
||||
import delegator
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def bake():
|
||||
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", "-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
|
||||
|
||||
|
||||
@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
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
test1: test2 test3
|
||||
echo '1'
|
||||
test2: test3
|
||||
echo '2'
|
||||
test3: echo
|
||||
echo 'hm'
|
||||
|
||||
python:
|
||||
#!/usr/bin/env python3
|
||||
print('wow!')
|
||||
|
||||
echo:
|
||||
echo 'hi, kenneth!'
|
||||
|
||||
needs-echo: echo
|
||||
|
||||
needs-needs: needs-echo
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
kinda-dangerous: @confirm
|
||||
echo 'success1'
|
||||
really-dangerous: @confirm:secure
|
||||
echo 'success2'
|
||||
|
||||
mostly-harmless: kinda-dangerous
|
||||
mostly-dangerous: really-dangerous
|
||||
Vendored
@@ -1,26 +0,0 @@
|
||||
import pytest
|
||||
|
||||
|
||||
def test_help(bake):
|
||||
c = bake("--help")
|
||||
assert "bake" in c.err
|
||||
|
||||
|
||||
def test_echo(bake):
|
||||
c = bake("echo", fixture="1")
|
||||
assert "kenneth" in c.err
|
||||
|
||||
|
||||
def test_first_level_dep(bake):
|
||||
c = bake("needs-echo", fixture="1")
|
||||
assert "kenneth" in c.err
|
||||
|
||||
|
||||
def test_second_level_dep(bake):
|
||||
c = bake("needs-needs", fixture="1")
|
||||
assert "kenneth" in c.err
|
||||
|
||||
|
||||
def test_python_invocation(bake):
|
||||
c = bake("python", fixture="1")
|
||||
assert "wow" in c.err
|
||||
Reference in New Issue
Block a user