Created
January 28, 2016 11:03
-
-
Save schuster-rainer/e6dff26cf44278cb134b to your computer and use it in GitHub Desktop.
Execute PIPED command in behave acceptance test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from behave import * | |
from os.path import join | |
from subprocess import Popen | |
import os | |
@when(u'the requirements are generated for documentation') | |
def step_impl(context): | |
cmd = " ".join(["my_fictional_command", | |
"input1", | |
context.requirements_filename, | |
">", | |
context.output_filename, | |
]) | |
print(cmd) | |
p = Popen(cmd, shell=True) | |
os.waitpid(p.pid, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment