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

Method test_maxread

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

Source from the content-addressed store, hash-verified

44 self.assertEqual(s.before, b' END\n')
45
46 def test_maxread (self):
47 socket = open_file_socket('TESTDATA.txt')
48 s = socket_pexpect.SocketSpawn(socket)
49 s.maxread = 100
50 s.expect('2')
51 s.expect ('This is the end of test data:')
52 s.expect (pexpect.EOF)
53 self.assertEqual(s.before, b' END\n')
54
55 def test_socket_isalive (self):
56 socket = open_file_socket('TESTDATA.txt')

Callers

nothing calls this directly

Calls 2

open_file_socketFunction · 0.85
expectMethod · 0.80

Tested by

no test coverage detected