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
502266f1
Commit
502266f1
authored
Sep 18, 2017
by
David Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Channel constructor and add simple test; closes #32
parent
4f50707b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
mitogen/core.py
mitogen/core.py
+2
-2
tests/channel_test.py
tests/channel_test.py
+16
-0
No files found.
mitogen/core.py
View file @
502266f1
...
...
@@ -308,8 +308,8 @@ class Receiver(object):
class
Channel
(
Sender
,
Receiver
):
def
__init__
(
self
,
router
,
context
,
dst_
id
,
handle
=
None
):
Sender
.
__init_
(
self
,
context
,
dst_id
)
def
__init__
(
self
,
router
,
context
,
dst_
handle
,
handle
=
None
):
Sender
.
__init_
_
(
self
,
context
,
dst_handle
)
Receiver
.
__init__
(
self
,
router
,
handle
)
def
__repr__
(
self
):
...
...
tests/channel_test.py
0 → 100644
View file @
502266f1
import
unittest
import
mitogen.core
import
testlib
class
ConstructorTest
(
testlib
.
RouterMixin
,
unittest
.
TestCase
):
def
test_constructor
(
self
):
# issue 32
l1
=
self
.
router
.
local
()
chan
=
mitogen
.
core
.
Channel
(
self
.
router
,
l1
,
123
)
assert
chan
.
router
==
self
.
router
assert
chan
.
context
==
l1
assert
chan
.
dst_handle
==
123
assert
chan
.
handle
is
not
None
assert
chan
.
handle
>
0
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