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
f22d05a7
Commit
f22d05a7
authored
Oct 02, 2017
by
David Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
frameworkize nested_test.
parent
15bf0f54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
tests/nested_test.py
tests/nested_test.py
+14
-9
No files found.
tests/nested_test.py
View file @
f22d05a7
import
os
import
mitogen.utils
import
unittest
@
mitogen
.
utils
.
run_with_router
def
main
(
router
):
mitogen
.
utils
.
log_to_file
()
import
testlib
context
=
None
for
x
in
range
(
1
,
11
):
print
'Connect local%d via %s'
%
(
x
,
context
)
context
=
router
.
local
(
via
=
context
,
name
=
'local%d'
%
x
)
context
.
call
(
os
.
system
,
'pstree -s python -s mitogen'
)
class
NestedTest
(
testlib
.
RouterMixin
,
testlib
.
TestCase
):
def
test_nested
(
self
):
context
=
None
for
x
in
range
(
1
,
11
):
#print 'Connect local%d via %s' % (x, context)
context
=
self
.
router
.
local
(
via
=
context
,
name
=
'local%d'
%
x
)
pid
=
context
.
call
(
os
.
getpid
)
self
.
assertTrue
(
isinstance
(
pid
,
int
))
if
__name__
==
'__main__'
:
unittest
.
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