##// END OF EJS Templates
cleanup in kernel.tests.utils
MinRK -
Show More
@@ -86,7 +86,6 b" def execute(code='', kc=None, **kwargs):"
86 def start_global_kernel():
86 def start_global_kernel():
87 """start the global kernel (if it isn't running) and return its client"""
87 """start the global kernel (if it isn't running) and return its client"""
88 global KM, KC
88 global KM, KC
89 print KM, KC
90 if KM is None:
89 if KM is None:
91 KM, KC = start_new_kernel()
90 KM, KC = start_new_kernel()
92 atexit.register(stop_global_kernel)
91 atexit.register(stop_global_kernel)
@@ -138,7 +137,7 b' def new_kernel():'
138 yield kc
137 yield kc
139 finally:
138 finally:
140 kc.stop_channels()
139 kc.stop_channels()
141 km.shutdown_kernel()
140 km.shutdown_kernel(now=True)
142
141
143
142
144 def assemble_output(iopub):
143 def assemble_output(iopub):
@@ -154,9 +153,9 b' def assemble_output(iopub):'
154 break
153 break
155 elif msg['msg_type'] == 'stream':
154 elif msg['msg_type'] == 'stream':
156 if content['name'] == 'stdout':
155 if content['name'] == 'stdout':
157 stdout = stdout + content['data']
156 stdout += content['data']
158 elif content['name'] == 'stderr':
157 elif content['name'] == 'stderr':
159 stderr = stderr + content['data']
158 stderr += content['data']
160 else:
159 else:
161 raise KeyError("bad stream: %r" % content['name'])
160 raise KeyError("bad stream: %r" % content['name'])
162 else:
161 else:
General Comments 0
You need to be logged in to leave comments. Login now