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
45cb7f65
Commit
45cb7f65
authored
Jan 15, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test_socket broken in previous commit (changeset 13e2e44db99d).
Added new checks for socket.setblocking().
parent
df20b51d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
Lib/test/test_socket.py
Lib/test/test_socket.py
+7
-5
No files found.
Lib/test/test_socket.py
View file @
45cb7f65
...
...
@@ -3566,7 +3566,10 @@ class NonBlockingTCPTests(ThreadedTCPSocketTest):
def
testSetBlocking
(
self
):
# Testing whether set blocking works
self
.
serv
.
setblocking
(
0
)
self
.
serv
.
setblocking
(
True
)
self
.
assertIsNone
(
self
.
serv
.
gettimeout
())
self
.
serv
.
setblocking
(
False
)
self
.
assertEqual
(
self
.
serv
.
gettimeout
(),
0.0
)
start
=
time
.
time
()
try
:
self
.
serv
.
accept
()
...
...
@@ -3575,10 +3578,9 @@ class NonBlockingTCPTests(ThreadedTCPSocketTest):
end
=
time
.
time
()
self
.
assertTrue
((
end
-
start
)
<
1.0
,
"Error setting non-blocking mode."
)
# Issue 15989
self
.
assertRaises
(
OverflowError
,
self
.
serv
.
setblocking
,
_testcapi
.
INT_MAX
+
1
)
self
.
assertRaises
(
OverflowError
,
self
.
serv
.
setblocking
,
_testcapi
.
UINT_MAX
+
1
)
if
_testcapi
.
UINT_MAX
<
_testcapi
.
ULONG_MAX
:
self
.
serv
.
setblocking
(
_testcapi
.
UINT_MAX
+
1
)
self
.
assertIsNone
(
self
.
serv
.
gettimeout
())
def
_testSetBlocking
(
self
):
pass
...
...
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