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

Method test_timeout

tests/test_async.py:24–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

22 print("Done")
23
24 async def test_timeout(self):
25 p = pexpect.spawn("cat")
26 with self.assertRaises(pexpect.TIMEOUT):
27 await p.expect("foo", timeout=1, async_=True)
28
29 p = pexpect.spawn("cat")
30 assert await p.expect(["foo", pexpect.TIMEOUT], timeout=1, async_=True) == 1
31
32 async def test_eof(self):
33 p = pexpect.spawn("cat")

Callers

nothing calls this directly

Calls 3

assertRaisesMethod · 0.80
expectMethod · 0.80
spawnMethod · 0.45

Tested by

no test coverage detected