Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mitogen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
mitogen
Commits
3c8c1f71
Commit
3c8c1f71
authored
Sep 21, 2017
by
David Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test.
parent
7a60b20d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
tests/call_function_test.py
tests/call_function_test.py
+8
-1
No files found.
tests/call_function_test.py
View file @
3c8c1f71
...
...
@@ -8,6 +8,10 @@ class CrazyType(object):
pass
def
function_that_adds_numbers
(
x
,
y
):
return
x
+
y
def
function_that_fails
():
raise
ValueError
(
'exception text'
)
...
...
@@ -38,6 +42,9 @@ class CallFunctionTest(unittest.TestCase):
cls
.
broker
.
shutdown
()
cls
.
broker
.
join
()
def
test_succeeds
(
self
):
assert
3
==
self
.
local
.
call
(
function_that_adds_numbers
,
1
,
2
)
def
test_crashes
(
self
):
try
:
self
.
local
.
call
(
function_that_fails
)
...
...
@@ -62,7 +69,7 @@ class CallFunctionTest(unittest.TestCase):
except
mitogen
.
core
.
StreamError
,
e
:
pass
assert
e
[
0
]
==
"
attempted unpickle from 'call_function_test
'"
assert
e
[
0
]
==
"
cannot unpickle 'call_function_test'/'CrazyType
'"
def
test_returns_dead
(
self
):
assert
mitogen
.
core
.
_DEAD
==
self
.
local
.
call
(
func_returns_dead
)
...
...
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