Show More
@@ -84,6 +84,16 b" def execute(code='', **kwargs):" | |||||
84 |
|
84 | |||
85 | class Reference(HasTraits): |
|
85 | class Reference(HasTraits): | |
86 |
|
86 | |||
|
87 | """ | |||
|
88 | Base class for message spec specification testing. | |||
|
89 | ||||
|
90 | This class is the core of the message specification test. The | |||
|
91 | idea is that child classes implement trait attributes for each | |||
|
92 | message keys, so that message keys can be tested against these | |||
|
93 | traits using :meth:`check` method. | |||
|
94 | ||||
|
95 | """ | |||
|
96 | ||||
87 | def check(self, d): |
|
97 | def check(self, d): | |
88 | """validate a dict against our traits""" |
|
98 | """validate a dict against our traits""" | |
89 | for key in self.trait_names(): |
|
99 | for key in self.trait_names(): | |
@@ -232,6 +242,9 b' references = {' | |||||
232 | 'stream' : Stream(), |
|
242 | 'stream' : Stream(), | |
233 | 'display_data' : DisplayData(), |
|
243 | 'display_data' : DisplayData(), | |
234 | } |
|
244 | } | |
|
245 | """ | |||
|
246 | Specifications of `content` part of the reply messages. | |||
|
247 | """ | |||
235 |
|
248 | |||
236 |
|
249 | |||
237 | def validate_message(msg, msg_type=None, parent=None): |
|
250 | def validate_message(msg, msg_type=None, parent=None): |
General Comments 0
You need to be logged in to leave comments.
Login now