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
eb5a537e
Commit
eb5a537e
authored
Jul 14, 2009
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update the tests with regard to kill() bahviour change
parent
e996abe3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
+3
-8
greentest/test__api.py
greentest/test__api.py
+1
-7
greentest/wsgi_test.py
greentest/wsgi_test.py
+2
-1
No files found.
greentest/test__api.py
View file @
eb5a537e
...
...
@@ -37,18 +37,12 @@ class Test(greentest.TestCase):
state
.
append
(
'except'
)
# catching GreenletExit
pass
# when switching to hub, hub makes itself the parent of this greenlet,
# thus after the function's done, the control will go to the parent
# QQQ why the first sleep is not enough?
gevent
.
sleep
(
0
)
state
.
append
(
'finished'
)
g
=
gevent
.
spawn
(
test
)
gevent
.
sleep
(
DELAY
/
2
)
assert
state
==
[
'start'
],
state
gevent
.
kill
(
g
)
gevent
.
kill
(
g
,
wait
=
True
)
# will not get there, unless switching is explicitly scheduled by kill
assert
state
==
[
'start'
,
'except'
],
state
gevent
.
sleep
(
DELAY
)
assert
state
==
[
'start'
,
'except'
,
'finished'
],
state
def
test_nested_with_timeout
(
self
):
...
...
greentest/wsgi_test.py
View file @
eb5a537e
...
...
@@ -135,7 +135,8 @@ class TestHttpd(TestCase):
socket
.
tcp_listener
((
'0.0.0.0'
,
12346
)),
self
.
site
,
max_size
=
128
,
log
=
self
.
logfile
)
def
tearDown
(
self
):
gevent
.
kill
(
self
.
killer
)
gevent
.
kill
(
self
.
killer
,
wait
=
True
)
gevent
.
sleep
(
0
)
# XXX kill should be enough!
def
test_001_server
(
self
):
sock
=
socket
.
connect_tcp
((
'127.0.0.1'
,
12346
))
...
...
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