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

Method test_setblocking_invalidfd

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

Source from the content-addressed store, hash-verified

6112 self.assertIs(socket.timeout, TimeoutError)
6113
6114 def test_setblocking_invalidfd(self):
6115 # Regression test for issue #28471
6116
6117 sock0 = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
6118 sock = socket.socket(
6119 socket.AF_INET, socket.SOCK_STREAM, 0, sock0.fileno())
6120 sock0.close()
6121 self.addCleanup(sock.detach)
6122
6123 with self.assertRaises(OSError):
6124 sock.setblocking(False)
6125
6126
6127@unittest.skipUnless(sys.platform in ('linux', 'android'), 'Linux specific test')

Callers

nothing calls this directly

Calls 6

socketMethod · 0.80
addCleanupMethod · 0.80
filenoMethod · 0.45
closeMethod · 0.45
assertRaisesMethod · 0.45
setblockingMethod · 0.45

Tested by

no test coverage detected