MCPcopy Index your code
hub / github.com/RustPython/RustPython / testTypes

Method testTypes

Lib/test/test_socket.py:6687–6704  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6685 s.close()
6686
6687 def testTypes(self):
6688 families = [socket.AF_INET, socket.AF_INET6]
6689 types = [socket.SOCK_STREAM, socket.SOCK_DGRAM]
6690 for f in families:
6691 for t in types:
6692 try:
6693 source = socket.socket(f, t)
6694 except OSError:
6695 continue # This combination is not supported
6696 try:
6697 data = source.share(os.getpid())
6698 shared = socket.fromshare(data)
6699 try:
6700 self.compareSockets(source, shared)
6701 finally:
6702 shared.close()
6703 finally:
6704 source.close()
6705
6706
6707class SendfileUsingSendTest(ThreadedTCPSocketTest):

Callers

nothing calls this directly

Calls 4

compareSocketsMethod · 0.95
socketMethod · 0.80
shareMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected