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
c0f8c968
Commit
c0f8c968
authored
Jan 14, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
greentest.py: don't fail if timer executes a bit earlier than it supposed to (happens on windows)
parent
bb535ed9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
greentest/greentest.py
greentest/greentest.py
+4
-4
No files found.
greentest/greentest.py
View file @
c0f8c968
...
...
@@ -127,7 +127,7 @@ class GenericWaitTestCase(TestCase):
result
=
self
.
wait
(
timeout
=
0.01
)
# join and wait simply returns after timeout expires
delay
=
time
.
time
()
-
start
assert
0.01
<=
delay
<
0.01
+
0.01
,
delay
assert
0.01
-
0.001
<=
delay
<
0.01
+
0.01
,
delay
assert
result
is
None
,
repr
(
result
)
...
...
@@ -143,7 +143,7 @@ class GenericGetTestCase(TestCase):
self
.
assertRaises
(
gevent
.
Timeout
,
self
.
wait
,
timeout
=
0.01
)
# get raises Timeout after timeout expired
delay
=
time
.
time
()
-
start
assert
0.01
<=
delay
<
0.01
+
0.01
,
delay
assert
0.01
-
0.001
<=
delay
<
0.01
+
0.01
,
delay
def
test_raises_timeout_Timeout
(
self
):
start
=
time
.
time
()
...
...
@@ -153,7 +153,7 @@ class GenericGetTestCase(TestCase):
except
gevent
.
Timeout
,
ex
:
assert
ex
is
timeout
,
(
ex
,
timeout
)
delay
=
time
.
time
()
-
start
assert
0.01
<=
delay
<
0.01
+
0.01
,
delay
assert
0.01
-
0.001
<=
delay
<
0.01
+
0.01
,
delay
def
test_raises_timeout_Timeout_exc_customized
(
self
):
start
=
time
.
time
()
...
...
@@ -164,5 +164,5 @@ class GenericGetTestCase(TestCase):
except
RuntimeError
,
ex
:
assert
ex
is
error
,
(
ex
,
error
)
delay
=
time
.
time
()
-
start
assert
0.01
<=
delay
<
0.01
+
0.01
,
delay
assert
0.01
-
0.001
<=
delay
<
0.01
+
0.01
,
delay
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