Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
efe644cb
Commit
efe644cb
authored
Jun 17, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test__hub.py: do not call time.sleep(-1) on windows because it hangs
parent
32fa7dec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
greentest/test__hub.py
greentest/test__hub.py
+12
-7
No files found.
greentest/test__hub.py
View file @
efe644cb
...
...
@@ -23,6 +23,7 @@ import greentest
import
unittest
import
time
import
re
import
sys
import
gevent
from
gevent
import
core
from
gevent
import
socket
...
...
@@ -130,16 +131,20 @@ class TestSleep(greentest.GenericWaitTestCase):
def
test_negative
(
self
):
self
.
switch_expected
=
False
self
.
assertRaises
(
IOError
,
gevent
.
sleep
,
-
1
)
from
time
import
sleep
as
real_sleep
try
:
real_sleep
(
-
1.1
)
except
IOError
,
real_ex
:
pass
if
sys
.
platform
!=
'win32'
:
from
time
import
sleep
as
real_sleep
try
:
real_sleep
(
-
0.1
)
except
IOError
,
real_ex
:
pass
else
:
# XXX real_sleep(-0.1) hangs on win32
real_ex
=
"[Errno 22] Invalid argument"
try
:
gevent
.
sleep
(
-
1
.1
)
gevent
.
sleep
(
-
0
.1
)
except
IOError
,
gevent_ex
:
pass
self
.
assertEqual
(
repr
(
gevent_ex
),
rep
r
(
real_ex
))
self
.
assertEqual
(
str
(
gevent_ex
),
st
r
(
real_ex
))
class
Expected
(
Exception
):
...
...
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