##// END OF EJS Templates
update kernel_info_reply test
Min RK -
Show More
@@ -4,8 +4,8 b''
4 # Distributed under the terms of the Modified BSD License.
4 # Distributed under the terms of the Modified BSD License.
5
5
6 import re
6 import re
7 import sys
7 from distutils.version import LooseVersion as V
8 from distutils.version import LooseVersion as V
8 from subprocess import PIPE
9 try:
9 try:
10 from queue import Empty # Py 3
10 from queue import Empty # Py 3
11 except ImportError:
11 except ImportError:
@@ -13,10 +13,8 b' except ImportError:'
13
13
14 import nose.tools as nt
14 import nose.tools as nt
15
15
16 from IPython.kernel import KernelManager
17
18 from IPython.utils.traitlets import (
16 from IPython.utils.traitlets import (
19 HasTraits, TraitError, Bool, Unicode, Dict, Integer, List, Enum, Any,
17 HasTraits, TraitError, Bool, Unicode, Dict, Integer, List, Enum,
20 )
18 )
21 from IPython.utils.py3compat import string_types, iteritems
19 from IPython.utils.py3compat import string_types, iteritems
22
20
@@ -150,15 +148,20 b' class CompleteReply(Reference):'
150 cursor_end = Integer()
148 cursor_end = Integer()
151 status = Unicode()
149 status = Unicode()
152
150
151 class LanguageInfo(Reference):
152 name = Unicode('python')
153 version = Unicode(sys.version.split()[0])
153
154
154 class KernelInfoReply(Reference):
155 class KernelInfoReply(Reference):
155 protocol_version = Version(min='5.0')
156 protocol_version = Version(min='5.0')
156 implementation = Unicode('ipython')
157 implementation = Unicode('ipython')
157 implementation_version = Version(min='2.1')
158 implementation_version = Version(min='2.1')
158 language_version = Version(min='2.7')
159 language = Unicode('python')
160 language_info = Dict()
159 language_info = Dict()
161 banner = Unicode()
160 banner = Unicode()
161
162 def check(self, d):
163 Reference.check(self, d)
164 LanguageInfo().check(d['language_info'])
162
165
163
166
164 class IsCompleteReply(Reference):
167 class IsCompleteReply(Reference):
General Comments 0
You need to be logged in to leave comments. Login now