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

Method test_fileobj

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

Source from the content-addressed store, hash-verified

59 s.close()
60
61 def test_fileobj(self):
62 f = open('TESTDATA.txt', 'r')
63 s = fdpexpect.fdspawn(f) # Should get the fileno from the file handle
64 s.expect('2')
65 s.close()
66 assert not s.isalive()
67 s.close() # Smoketest - should be able to call this again
68
69if __name__ == '__main__':
70 unittest.main()

Callers

nothing calls this directly

Calls 3

expectMethod · 0.80
closeMethod · 0.45
isaliveMethod · 0.45

Tested by

no test coverage detected