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

Method testGetSockOpt

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

Source from the content-addressed store, hash-verified

1534 self.assertEqual(name[1], port)
1535
1536 def testGetSockOpt(self):
1537 # Testing getsockopt()
1538 # We know a socket should start without reuse==0
1539 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1540 self.addCleanup(sock.close)
1541 reuse = sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR)
1542 self.assertFalse(reuse != 0, "initial mode is reuse")
1543
1544 def testSetSockOpt(self):
1545 # Testing setsockopt()

Callers

nothing calls this directly

Calls 4

socketMethod · 0.80
addCleanupMethod · 0.80
assertFalseMethod · 0.80
getsockoptMethod · 0.45

Tested by

no test coverage detected