def test_process_output_shell(command):
    """Start process, check output and shut it down with shell set to True."""
    executor = SimpleExecutor(command, 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 = SimpleExecutor(command)
    executor.start()

    assert executor.output().read() == 'foobar'
    executor.stop()
Beispiel #3
0
def test_process_output_shell(command):
    """Start process, check output and shut it down with shell set to True."""
    executor = SimpleExecutor(command, shell=True)
    executor.start()

    assert executor.output().read() == 'foobar'
    executor.stop()
Beispiel #4
0
def test_process_output(command):
    """Start process, check output and shut it down."""
    executor = SimpleExecutor(command)
    executor.start()

    assert executor.output().read() == 'foobar'
    executor.stop()
Beispiel #5
0
def test_process_output_shell(command: Union[str, List[str]]) -> None:
    """Start process, check output and shut it down with shell set to True."""
    executor = SimpleExecutor(command, shell=True)
    executor.start()

    assert executor.output().read().strip() == "foobar"
    executor.stop()
Beispiel #6
0
def test_process_output(command: Union[str, List[str]]) -> None:
    """Start process, check output and shut it down."""
    executor = SimpleExecutor(command)
    executor.start()

    assert executor.output().read() == "foobar\n"
    executor.stop()