#298 Simplify func tests

This commit is contained in:
nvbn
2015-07-29 16:30:32 +03:00
parent 8962cf2ec1
commit 9d91b96780
6 changed files with 89 additions and 104 deletions
+3 -6
View File
@@ -23,8 +23,7 @@ def build_container(tag, dockerfile):
shutil.rmtree(tmpdir)
@contextmanager
def spawn(tag, dockerfile, cmd):
def spawn(request, tag, dockerfile, cmd):
if bare:
proc = pexpect.spawnu(cmd)
else:
@@ -36,10 +35,8 @@ def spawn(tag, dockerfile, cmd):
proc.logfile = sys.stdout
try:
yield proc
finally:
proc.terminate(force=bare)
request.addfinalizer(proc.terminate)
return proc
def images(*items):