mirror of
https://github.com/kennethreitz/bake.git
synced 2026-06-05 23:00:17 +00:00
fix tests
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
def test_echo(bake):
|
||||
c = bake("echo", fixture="1")
|
||||
assert "kenneth" in c.out
|
||||
assert "kenneth" in c.err
|
||||
|
||||
|
||||
def test_first_level_dep(bake):
|
||||
c = bake("needs-echo", fixture="1")
|
||||
assert "kenneth" in c.out
|
||||
assert "kenneth" in c.err
|
||||
|
||||
|
||||
def test_second_level_dep(bake):
|
||||
c = bake("needs-needs", fixture="1")
|
||||
assert "kenneth" in c.out
|
||||
assert "kenneth" in c.err
|
||||
|
||||
|
||||
def test_python_invocation(bake):
|
||||
c = bake("python", fixture="1")
|
||||
assert "wow" in c.out
|
||||
assert "wow" in c.err
|
||||
|
||||
+12
-12
@@ -1,30 +1,30 @@
|
||||
def test_confirm(bake):
|
||||
c = bake("kinda-dangerous", fixture="2", block=False)
|
||||
def test_confirm(bake_i):
|
||||
c = bake_i("kinda-dangerous", fixture="2", block=False)
|
||||
c.expect(":", timeout=0.5)
|
||||
c.send("N\n")
|
||||
c.block()
|
||||
assert "Aborted!" in c.out
|
||||
assert "Aborted!" in c.err
|
||||
|
||||
|
||||
def test_confirm_secure(bake):
|
||||
c = bake("really-dangerous", fixture="2", block=False)
|
||||
def test_confirm_secure(bake_i):
|
||||
c = bake_i("really-dangerous", fixture="2", block=False)
|
||||
c.expect(":", timeout=0.5)
|
||||
c.send("4222\n")
|
||||
c.block()
|
||||
assert "Wrong answer!" in c.out
|
||||
assert "Wrong answer!" in c.err
|
||||
|
||||
|
||||
def test_confirm_dep(bake):
|
||||
c = bake("mostly-harmless", fixture="2", block=False)
|
||||
def test_confirm_dep(bake_i):
|
||||
c = bake_i("mostly-harmless", fixture="2", block=False)
|
||||
c.expect(":", timeout=0.5)
|
||||
c.send("N\n")
|
||||
c.block()
|
||||
assert "Aborted!" in c.out
|
||||
assert "Aborted!" in c.err
|
||||
|
||||
|
||||
def test_confirm_secure(bake):
|
||||
c = bake("mostly-dangerous", fixture="2", block=False)
|
||||
def test_confirm_secure(bake_i):
|
||||
c = bake_i("mostly-dangerous", fixture="2", block=False)
|
||||
c.expect(":", timeout=0.5)
|
||||
c.send("4222\n")
|
||||
c.block()
|
||||
assert "Wrong answer!" in c.out
|
||||
assert "Wrong answer!" in c.err
|
||||
|
||||
Reference in New Issue
Block a user