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

Method test_expect_timeout

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

Source from the content-addressed store, hash-verified

95 assert the_old_way == the_new_way, len(the_old_way) - len(the_new_way)
96
97 def test_expect_timeout(self):
98 p = PopenSpawn('cat', timeout=5)
99 p.expect(pexpect.TIMEOUT) # This tells it to wait for timeout.
100 self.assertEqual(p.after, pexpect.TIMEOUT)
101
102 def test_unexpected_eof(self):
103 p = PopenSpawn('ls -l /bin')

Callers

nothing calls this directly

Calls 2

PopenSpawnClass · 0.90
expectMethod · 0.80

Tested by

no test coverage detected