##// END OF EJS Templates
Merge pull request #8451 from minrk/adapt-object-info...
Thomas Kluyver -
r21368:7c969a7e merge
parent child Browse files
Show More
@@ -292,7 +292,6 b' class V4toV5(Adapter):'
292 292 content = msg['content']
293 293 new_content = msg['content'] = {'status' : 'ok'}
294 294 found = new_content['found'] = content['found']
295 new_content['name'] = content['oname']
296 295 new_content['data'] = data = {}
297 296 new_content['metadata'] = {}
298 297 if found:
@@ -155,7 +155,7 b' class V4toV5TestCase(AdapterTest):'
155 155
156 156 def test_object_info_reply(self):
157 157 msg = self.msg("object_info_reply", {
158 'oname' : 'foo',
158 'name' : 'foo',
159 159 'found' : True,
160 160 'status' : 'ok',
161 161 'definition' : 'foo(a=5)',
@@ -165,10 +165,26 b' class V4toV5TestCase(AdapterTest):'
165 165 self.assertEqual(v5['header']['msg_type'], 'inspect_reply')
166 166 v4c = v4['content']
167 167 v5c = v5['content']
168 self.assertEqual(sorted(v5c), [ 'data', 'found', 'metadata', 'name', 'status'])
168 self.assertEqual(sorted(v5c), [ 'data', 'found', 'metadata', 'status'])
169 169 text = v5c['data']['text/plain']
170 170 self.assertEqual(text, '\n'.join([v4c['definition'], v4c['docstring']]))
171
171
172 def test_object_info_reply_not_found(self):
173 msg = self.msg("object_info_reply", {
174 'name' : 'foo',
175 'found' : False,
176 })
177 v4, v5 = self.adapt(msg)
178 self.assertEqual(v5['header']['msg_type'], 'inspect_reply')
179 v4c = v4['content']
180 v5c = v5['content']
181 self.assertEqual(v5c, {
182 'status': 'ok',
183 'found': False,
184 'data': {},
185 'metadata': {},
186 })
187
172 188 def test_kernel_info_reply(self):
173 189 msg = self.msg("kernel_info_reply", {
174 190 'language': 'python',
General Comments 0
You need to be logged in to leave comments. Login now