Exemplo n.º 1
0
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()
Exemplo n.º 2
0
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()
Exemplo n.º 3
0
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()
Exemplo n.º 4
0
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()