We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
buffers
1 parent ada6522 commit e9ef42aCopy full SHA for e9ef42a
tests/test_socket.py
@@ -53,6 +53,12 @@ def test_recvmsg_into():
53
assert buf[: len(test_data)] == test_data
54
55
56
+def test_recvmsg_into_empty_buffers():
57
+ sock = MocketSocket(socket.AF_INET, socket.SOCK_STREAM)
58
+ result = sock.recvmsg_into([])
59
+ assert result == 0
60
+
61
62
def test_accept():
63
sock = MocketSocket(socket.AF_INET, socket.SOCK_STREAM)
64
sock._host = "127.0.0.1"
@@ -78,3 +84,9 @@ def test_sendmsg():
78
84
total_sent = sock.sendmsg(msg)
79
85
assert total_sent == sum(len(m) for m in msg)
80
86
assert Mocket.last_request() == b"".join(msg)
87
88
89
+def test_sendmsg_empty_buffers():
90
91
+ result = sock.sendmsg([])
92
0 commit comments