##// END OF EJS Templates
handle pyout messages in test_message_spec...
MinRK -
Show More
@@ -34,6 +34,11 b' def setup():'
34
34
35 KM.start_kernel(stdout=PIPE, stderr=PIPE)
35 KM.start_kernel(stdout=PIPE, stderr=PIPE)
36 KM.start_channels()
36 KM.start_channels()
37
38 # wait for kernel to be ready
39 KM.shell_channel.execute("pass")
40 KM.shell_channel.get_msg(block=True, timeout=5)
41 flush_channels()
37
42
38
43
39 def teardown():
44 def teardown():
@@ -207,12 +212,22 b' class DisplayData(Reference):'
207 nt.assert_true(isinstance(v, basestring), "expected string data, got %r" % v)
212 nt.assert_true(isinstance(v, basestring), "expected string data, got %r" % v)
208
213
209
214
215 class PyOut(Reference):
216 execution_count = Integer()
217 data = Dict()
218 def _data_changed(self, name, old, new):
219 for k,v in new.iteritems():
220 nt.assert_true(mime_pat.match(k))
221 nt.assert_true(isinstance(v, basestring), "expected string data, got %r" % v)
222
223
210 references = {
224 references = {
211 'execute_reply' : ExecuteReply(),
225 'execute_reply' : ExecuteReply(),
212 'object_info_reply' : OInfoReply(),
226 'object_info_reply' : OInfoReply(),
213 'status' : Status(),
227 'status' : Status(),
214 'complete_reply' : CompleteReply(),
228 'complete_reply' : CompleteReply(),
215 'pyin' : PyIn(),
229 'pyin' : PyIn(),
230 'pyout' : PyOut(),
216 'pyerr' : PyErr(),
231 'pyerr' : PyErr(),
217 'stream' : Stream(),
232 'stream' : Stream(),
218 'display_data' : DisplayData(),
233 'display_data' : DisplayData(),
General Comments 0
You need to be logged in to leave comments. Login now