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

Method _testNonBlocking

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

Source from the content-addressed store, hash-verified

6996 # non blocking sockets are not supposed to work
6997
6998 def _testNonBlocking(self):
6999 address = self.serv.getsockname()
7000 file = open(os_helper.TESTFN, 'rb')
7001 with socket.create_connection(address) as sock, file as file:
7002 sock.setblocking(False)
7003 meth = self.meth_from_sock(sock)
7004 self.assertRaises(ValueError, meth, file)
7005 self.assertRaises(ValueError, sock.sendfile, file)
7006
7007 def testNonBlocking(self):
7008 conn = self.accept_conn()

Callers

nothing calls this directly

Calls 6

meth_from_sockMethod · 0.95
openFunction · 0.50
getsocknameMethod · 0.45
create_connectionMethod · 0.45
setblockingMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected