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
b13f582f
Commit
b13f582f
authored
Aug 13, 2009
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a few tests to test__greenlet.py
parent
939cb70b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
greentest/test__greenlet.py
greentest/test__greenlet.py
+12
-8
No files found.
greentest/test__greenlet.py
View file @
b13f582f
...
@@ -428,7 +428,7 @@ class TestStuff(greentest.TestCase):
...
@@ -428,7 +428,7 @@ class TestStuff(greentest.TestCase):
sleep
(
DELAY
*
10
)
sleep
(
DELAY
*
10
)
assert
results
in
[[
10
,
20
],
[
20
,
10
]],
results
assert
results
in
[[
10
,
20
],
[
20
,
10
]],
results
def
_test_multiple_listeners_error_unlink
(
self
,
p
):
def
_test_multiple_listeners_error_unlink
(
self
,
p
,
link
):
# notification must not happen after unlink even
# notification must not happen after unlink even
# though notification process has been already started
# though notification process has been already started
results
=
[]
results
=
[]
...
@@ -442,20 +442,24 @@ class TestStuff(greentest.TestCase):
...
@@ -442,20 +442,24 @@ class TestStuff(greentest.TestCase):
raise
ExpectedError
(
'listener2'
)
raise
ExpectedError
(
'listener2'
)
def
listener3
(
*
args
):
def
listener3
(
*
args
):
raise
ExpectedError
(
'listener3'
)
raise
ExpectedError
(
'listener3'
)
p
.
link
(
listener1
)
link
(
listener1
)
p
.
link
(
listener2
)
link
(
listener2
)
p
.
link
(
listener3
)
link
(
listener3
)
sleep
(
DELAY
*
10
)
sleep
(
DELAY
*
10
)
assert
results
==
[
5
],
results
assert
results
==
[
5
],
results
def
test_multiple_listeners_error_unlink_Greenlet
(
self
):
def
test_multiple_listeners_error_unlink_Greenlet_link
(
self
):
p
=
gevent
.
spawn
(
lambda
:
5
)
self
.
_test_multiple_listeners_error_unlink
(
p
,
p
.
link
)
def
test_multiple_listeners_error_unlink_Greenlet_rawlink
(
self
):
p
=
gevent
.
spawn
(
lambda
:
5
)
p
=
gevent
.
spawn
(
lambda
:
5
)
self
.
_test_multiple_listeners_error_unlink
(
p
)
self
.
_test_multiple_listeners_error_unlink
(
p
,
p
.
rawlink
)
def
test_multiple_listeners_error_unlink_Event
(
self
):
def
test_multiple_listeners_error_unlink_Event
_rawlink
(
self
):
e
=
Event
()
e
=
Event
()
gevent
.
spawn
(
e
.
put
,
6
)
gevent
.
spawn
(
e
.
put
,
6
)
self
.
_test_multiple_listeners_error_unlink
(
e
)
self
.
_test_multiple_listeners_error_unlink
(
e
,
e
.
rawlink
)
def
test_killing_unlinked
(
self
):
def
test_killing_unlinked
(
self
):
e
=
AsyncResult
()
e
=
AsyncResult
()
...
...
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