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

Method test_fd_isalive

tests/test_filedescriptor.py:48–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

46 self.assertEqual(s.before, b' END\n')
47
48 def test_fd_isalive (self):
49 fd = os.open ('TESTDATA.txt', os.O_RDONLY)
50 s = fdpexpect.fdspawn(fd)
51 assert s.isalive()
52 os.close(fd)
53 assert not s.isalive(), "Should not be alive after close()"
54
55 def test_fd_isatty (self):
56 fd = os.open ('TESTDATA.txt', os.O_RDONLY)

Callers

nothing calls this directly

Calls 3

openMethod · 0.80
isaliveMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected