MCPcopy Create free account
hub / github.com/pexpect/pexpect / test_long_running_multiline

Method test_long_running_multiline

tests/test_replwrap.py:54–58  ·  view source on GitHub ↗

ensure the default timeout is used for multi-line commands.

(self)

Source from the content-addressed store, hash-verified

52 assert res.startswith('/'), res
53
54 def test_long_running_multiline(self):
55 " ensure the default timeout is used for multi-line commands. "
56 bash = replwrap.bash()
57 res = bash.run_command("echo begin\r\nsleep 2\r\necho done")
58 self.assertEqual(res.strip().splitlines(), ['begin', 'done'])
59
60 def test_long_running_continuation(self):
61 " also ensure timeout when used within continuation prompts. "

Callers

nothing calls this directly

Calls 1

run_commandMethod · 0.80

Tested by

no test coverage detected