Commit 5cfc68cd by Peter Weidenbach

timeout message added

parent 73573cf3
......@@ -69,6 +69,7 @@ def execute_interactive_shell_command(shell_command, timeout=60, inputs={}):
except pexpect.TIMEOUT:
child.kill(SIGKILL)
output += child.before
output += b'\n\nError: Execution timed out!'
break
except pexpect.EOF:
output += child.before
......
......@@ -53,5 +53,5 @@ class TestProcessHelper(unittest.TestCase):
script_path = os.path.join(get_dir_of_file(__file__), 'data/interactive.sh')
output, ret_code = execute_interactive_shell_command(script_path, timeout=2)
assert 'give me some input' in output
assert 'Error: Execution timed out!'
assert '\n\nError: Execution timed out!' in output
assert ret_code > 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment