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

Method test_unexpected_eof

tests/test_popen_spawn.py:102–109  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

100 self.assertEqual(p.after, pexpect.TIMEOUT)
101
102 def test_unexpected_eof(self):
103 p = PopenSpawn('ls -l /bin')
104 try:
105 p.expect('_Z_XY_XZ') # Probably never see this in ls output.
106 except pexpect.EOF:
107 pass
108 else:
109 self.fail('Expected an EOF exception.')
110
111 def test_bad_arg(self):
112 p = PopenSpawn('cat')

Callers

nothing calls this directly

Calls 2

PopenSpawnClass · 0.90
expectMethod · 0.80

Tested by

no test coverage detected