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

Method test_write

tests/test_misc.py:148–153  ·  view source on GitHub ↗

write a character and return it in return.

(self)

Source from the content-addressed store, hash-verified

146 assert child.exitstatus == 0
147
148 def test_write(self):
149 " write a character and return it in return. "
150 child = pexpect.spawn('cat', echo=False)
151 child.write('a')
152 child.write('\r')
153 self.assertEqual(child.readline(), b'a\r\n')
154
155 def test_writelines(self):
156 " spawn.writelines() "

Callers

nothing calls this directly

Calls 3

readlineMethod · 0.80
spawnMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected