mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-31819: Add AbstractEventLoop.sock_recv_into() (#4051)
* bpo-31819: Add AbstractEventLoop.sock_recv_into() * Add NEWS * Add doc
This commit is contained in:
parent
ea2ef5d0ca
commit
525f40d231
9 changed files with 266 additions and 58 deletions
|
@ -489,6 +489,11 @@ class BaseProactorEventLoopTests(test_utils.TestCase):
|
|||
self.loop.sock_recv(self.sock, 1024)
|
||||
self.proactor.recv.assert_called_with(self.sock, 1024)
|
||||
|
||||
def test_sock_recv_into(self):
|
||||
buf = bytearray(10)
|
||||
self.loop.sock_recv_into(self.sock, buf)
|
||||
self.proactor.recv_into.assert_called_with(self.sock, buf)
|
||||
|
||||
def test_sock_sendall(self):
|
||||
self.loop.sock_sendall(self.sock, b'data')
|
||||
self.proactor.send.assert_called_with(self.sock, b'data')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue