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

Method test_long_running_continuation

tests/test_replwrap.py:60–70  ·  view source on GitHub ↗

also ensure timeout when used within continuation prompts.

(self)

Source from the content-addressed store, hash-verified

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. "
62 bash = replwrap.bash()
63 # The two extra '\\' in the following expression force a continuation
64 # prompt:
65 # $ echo begin\
66 # + ;
67 # $ sleep 2
68 # $ echo done
69 res = bash.run_command("echo begin\\\n;sleep 2\r\necho done")
70 self.assertEqual(res.strip().splitlines(), ['begin', 'done'])
71
72 def test_multiline(self):
73 bash = replwrap.bash()

Callers

nothing calls this directly

Calls 1

run_commandMethod · 0.80

Tested by

no test coverage detected