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
bd2c5966
Commit
bd2c5966
authored
Jul 21, 2009
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test__api_timeout.py: add a few new tests
parent
29c984ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
greentest/test__api_timeout.py
greentest/test__api_timeout.py
+19
-7
No files found.
greentest/test__api_timeout.py
View file @
bd2c5966
...
...
@@ -118,13 +118,25 @@ class Test(greentest.TestCase):
sleep
(
DELAY
*
3
)
raise
AssertionError
(
'should not get there'
)
# this case fails and there's no intent to fix it.
# just don't do it like that
#with Timeout(DELAY, _SilentException):
# with Timeout(DELAY*2, _SilentException):
# sleep(DELAY*3)
# assert False, 'should not get there'
with
Timeout
(
DELAY
)
as
t1
:
with
Timeout
(
DELAY
*
2
)
as
t2
:
try
:
sleep
(
DELAY
*
3
)
except
Timeout
,
ex
:
assert
ex
is
t1
,
(
ex
,
t1
)
assert
not
t1
.
pending
,
t1
assert
t2
.
pending
,
t2
assert
not
t2
.
pending
,
t2
with
Timeout
(
DELAY
*
2
)
as
t1
:
with
Timeout
(
DELAY
)
as
t2
:
try
:
sleep
(
DELAY
*
3
)
except
Timeout
,
ex
:
assert
ex
is
t2
,
(
ex
,
t2
)
assert
t1
.
pending
,
t1
assert
not
t2
.
pending
,
t2
assert
not
t1
.
pending
,
t1
if
__name__
==
'__main__'
:
...
...
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