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

Function open_file_socket

tests/test_socket_pexpect.py:27–32  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

25import socket
26
27def open_file_socket(filename):
28 read_socket, write_socket = socket.socketpair()
29 with open(filename, "rb") as file:
30 write_socket.sendall(file.read())
31 write_socket.close()
32 return read_socket
33
34class ExpectTestCase(PexpectTestCase.PexpectTestCase):
35 def setUp(self):

Callers 4

test_socketMethod · 0.85
test_maxreadMethod · 0.85
test_socket_isaliveMethod · 0.85
test_socket_isattyMethod · 0.85

Calls 2

readMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…