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

Method test_sendmsg_afalg_args

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

Source from the content-addressed store, hash-verified

7163 self.assertEqual(len(rn), 32)
7164
7165 def test_sendmsg_afalg_args(self):
7166 sock = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)
7167 with sock:
7168 with self.assertRaises(TypeError):
7169 sock.sendmsg_afalg()
7170
7171 with self.assertRaises(TypeError):
7172 sock.sendmsg_afalg(op=None)
7173
7174 with self.assertRaises(TypeError):
7175 sock.sendmsg_afalg(1)
7176
7177 with self.assertRaises(TypeError):
7178 sock.sendmsg_afalg(op=socket.ALG_OP_ENCRYPT, assoclen=None)
7179
7180 with self.assertRaises(TypeError):
7181 sock.sendmsg_afalg(op=socket.ALG_OP_ENCRYPT, assoclen=-1)
7182
7183 def test_length_restriction(self):
7184 # bpo-35050, off-by-one error in length check

Callers

nothing calls this directly

Calls 3

socketMethod · 0.80
sendmsg_afalgMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected