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

Method _testSendmsgDontWait

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

Source from the content-addressed store, hash-verified

3645
3646 @testSendmsgDontWait.client_skip
3647 def _testSendmsgDontWait(self):
3648 try:
3649 with self.assertRaises(OSError) as cm:
3650 while True:
3651 self.sendmsgToServer([b"a"*512], [], socket.MSG_DONTWAIT)
3652 # bpo-33937: catch also ENOMEM, the test randomly fails on Travis CI
3653 # with "OSError: [Errno 12] Cannot allocate memory"
3654 self.assertIn(cm.exception.errno,
3655 (errno.EAGAIN, errno.EWOULDBLOCK, errno.ENOMEM))
3656 finally:
3657 self.misc_event.set()
3658
3659
3660class SendmsgConnectionlessTests(SendmsgTests):

Callers

nothing calls this directly

Calls 4

sendmsgToServerMethod · 0.80
assertInMethod · 0.80
assertRaisesMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected