def test_process_output_shell(): """Start process, check output and shut it down with shell set to True.""" executor = Executor('echo -n "foobar"', shell=True) executor.start() assert executor.output().read() == 'foobar' executor.stop()
def test_process_output(command): """Start process, check output and shut it down.""" executor = Executor(command) executor.start() assert executor.output().read() == 'foobar' executor.stop()
def test_process_output(): """Start process, check output and shut it down.""" executor = Executor('echo -n "foobar"') executor.start() assert executor.output().read() == 'foobar' executor.stop()
def test_process_output_shell(command): """Start process, check output and shut it down with shell set to True.""" executor = Executor(command, shell=True) executor.start() assert executor.output().read() == 'foobar' executor.stop()