Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Document how test_message_spec works

  • Loading branch information...
commit 61e383bb9902d086026c3e6b61d44a6507171a3c 1 parent c4fc493
@tkf authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 IPython/zmq/tests/test_message_spec.py
View
15 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 @@ def _data_changed(self, name, old, new):
'stream' : Stream(),
'display_data' : DisplayData(),
}
+"""
+Specifications of `content` part of the reply messages.
+"""
def validate_message(msg, msg_type=None, parent=None):
Please sign in to comment.
Something went wrong with that request. Please try again.