Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d261cb62
Commit
d261cb62
authored
Oct 02, 2016
by
Berker Peksag
Browse files
Options
Browse Files
Download
Plain Diff
Issue #20254: Merge from 3.5
parents
aa7a55e7
480b0692
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Lib/test/test_socket.py
Lib/test/test_socket.py
+4
-2
No files found.
Lib/test/test_socket.py
View file @
d261cb62
...
...
@@ -4668,9 +4668,10 @@ class BufferIOTest(SocketConnectedTest):
SocketConnectedTest
.
__init__
(
self
,
methodName
=
methodName
)
def
testRecvIntoArray
(
self
):
buf
=
bytearray
(
1024
)
buf
=
array
.
array
(
"B"
,
[
0
]
*
len
(
MSG
)
)
nbytes
=
self
.
cli_conn
.
recv_into
(
buf
)
self
.
assertEqual
(
nbytes
,
len
(
MSG
))
buf
=
buf
.
tobytes
()
msg
=
buf
[:
len
(
MSG
)]
self
.
assertEqual
(
msg
,
MSG
)
...
...
@@ -4697,9 +4698,10 @@ class BufferIOTest(SocketConnectedTest):
_testRecvIntoMemoryview
=
_testRecvIntoArray
def
testRecvFromIntoArray
(
self
):
buf
=
bytearray
(
1024
)
buf
=
array
.
array
(
"B"
,
[
0
]
*
len
(
MSG
)
)
nbytes
,
addr
=
self
.
cli_conn
.
recvfrom_into
(
buf
)
self
.
assertEqual
(
nbytes
,
len
(
MSG
))
buf
=
buf
.
tobytes
()
msg
=
buf
[:
len
(
MSG
)]
self
.
assertEqual
(
msg
,
MSG
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment