MCPcopy Index your code
hub / github.com/python/cpython / checkFDs

Method checkFDs

Lib/test/test_socket.py:4054–4059  ·  view source on GitHub ↗
(self, fds)

Source from the content-addressed store, hash-verified

4052 return fds
4053
4054 def checkFDs(self, fds):
4055 # Check that the file descriptors in the given list contain
4056 # their correct list indices as ASCII numbers.
4057 for n, fd in enumerate(fds):
4058 os.lseek(fd, 0, os.SEEK_SET)
4059 self.assertEqual(os.read(fd, 1024), str(n).encode())
4060
4061 def registerRecvmsgResult(self, result):
4062 self.addCleanup(self.closeRecvmsgFDs, result)

Callers 3

checkRecvmsgFDsMethod · 0.95
checkTruncatedArrayMethod · 0.95

Calls 5

enumerateFunction · 0.85
strFunction · 0.85
assertEqualMethod · 0.45
readMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected