MCPcopy Create free account
hub / github.com/RustPython/RustPython / _testNonBlocking

Method _testNonBlocking

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

Source from the content-addressed store, hash-verified

6893 # non blocking sockets are not supposed to work
6894
6895 def _testNonBlocking(self):
6896 address = self.serv.getsockname()
6897 file = open(os_helper.TESTFN, 'rb')
6898 with socket.create_connection(address) as sock, file as file:
6899 sock.setblocking(False)
6900 meth = self.meth_from_sock(sock)
6901 self.assertRaises(ValueError, meth, file)
6902 self.assertRaises(ValueError, sock.sendfile, file)
6903
6904 def testNonBlocking(self):
6905 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