From 61e383bb9902d086026c3e6b61d44a6507171a3c 2012-12-04 22:45:58 From: Takafumi Arakaki Date: 2012-12-04 22:45:58 Subject: [PATCH] Document how test_message_spec works --- diff --git a/IPython/zmq/tests/test_message_spec.py b/IPython/zmq/tests/test_message_spec.py index 2bbb90c..2bfda26 100644 --- a/IPython/zmq/tests/test_message_spec.py +++ b/IPython/zmq/tests/test_message_spec.py @@ -83,7 +83,17 @@ def execute(code='', **kwargs): class Reference(HasTraits): - + + """ + Base class for message spec specification testing. + + This class is the core of the message specification test. The + idea is that child classes implement trait attributes for each + message keys, so that message keys can be tested against these + traits using :meth:`check` method. + + """ + def check(self, d): """validate a dict against our traits""" for key in self.trait_names(): @@ -232,6 +242,9 @@ references = { 'stream' : Stream(), 'display_data' : DisplayData(), } +""" +Specifications of `content` part of the reply messages. +""" def validate_message(msg, msg_type=None, parent=None):