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

Method _expect_echo_toggle_off

tests/test_unicode.py:81–89  ·  view source on GitHub ↗
(self, p)

Source from the content-addressed store, hash-verified

79 assert index == 0, index
80
81 def _expect_echo_toggle_off(self, p):
82 p.setecho(0) # Turn off tty echo
83 p.waitnoecho()
84 p.sendline('abcdé') # Now, should only see this once.
85 p.sendline('wxyz') # Should also be only once.
86 index = p.expect ([pexpect.EOF,pexpect.TIMEOUT, 'abcdé', 'wxyz', '1234'])
87 assert index == 2, index
88 index = p.expect ([pexpect.EOF, 'abcdé', 'wxyz', '7890'])
89 assert index == 2, index
90
91 def _expect_echo_toggle_on(self, p):
92 p.setecho(1) # Turn on tty echo

Calls 4

setechoMethod · 0.80
waitnoechoMethod · 0.80
expectMethod · 0.80
sendlineMethod · 0.45

Tested by

no test coverage detected