-
-
Notifications
You must be signed in to change notification settings - Fork 396
Adding comm_info_request and comm_info_reply messages #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ | |
| from Queue import Empty # Py 2 | ||
|
|
||
| import nose.tools as nt | ||
| from nose.plugins.skip import SkipTest | ||
|
|
||
| from traitlets import ( | ||
| HasTraits, TraitError, Bool, Unicode, Dict, Integer, List, Enum, | ||
|
|
@@ -163,6 +164,8 @@ def check(self, d): | |
| Reference.check(self, d) | ||
| LanguageInfo().check(d['language_info']) | ||
|
|
||
| class CommInfoReply(Reference): | ||
| comms = Dict() | ||
|
|
||
| class IsCompleteReply(Reference): | ||
| status = Enum((u'complete', u'incomplete', u'invalid', u'unknown'), default_value=u'complete') | ||
|
|
@@ -198,6 +201,7 @@ class DisplayData(MimeBundle): | |
| class ExecuteResult(MimeBundle): | ||
| execution_count = Integer() | ||
|
|
||
|
|
||
| class HistoryReply(Reference): | ||
| history = List(List()) | ||
|
|
||
|
|
@@ -208,6 +212,7 @@ class HistoryReply(Reference): | |
| 'status' : Status(), | ||
| 'complete_reply' : CompleteReply(), | ||
| 'kernel_info_reply': KernelInfoReply(), | ||
| 'comm_info_reply': CommInfoReply(), | ||
| 'is_complete_reply': IsCompleteReply(), | ||
| 'execute_input' : ExecuteInput(), | ||
| 'execute_result' : ExecuteResult(), | ||
|
|
@@ -419,6 +424,15 @@ def test_kernel_info_request(): | |
| validate_message(reply, 'kernel_info_reply', msg_id) | ||
|
|
||
|
|
||
| def test_comm_info_request(): | ||
| flush_channels() | ||
| if not hasattr(KC, 'comm_info'): | ||
| raise SkipTest() | ||
| msg_id = KC.comm_info() | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
| reply = KC.get_shell_msg(timeout=TIMEOUT) | ||
| validate_message(reply, 'comm_info_reply', msg_id) | ||
|
|
||
|
|
||
| def test_single_payload(): | ||
| flush_channels() | ||
| msg_id, reply = execute(code="for i in range(3):\n"+ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ipykernel? Actually, we should just answer the question now...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it is @minrk's call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a fine place for it.