changeset 1183:b5eea8738968

Warn about overriding setUp and tearDown.
author Martin Geisler <mg@cs.au.dk>
date Wed, 20 May 2009 09:34:42 +0200
parents e89fb02c5e3d
children 8ec45943c12a
files viff/test/util.py
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/viff/test/util.py	Thu May 14 12:01:54 2009 +0200
+++ b/viff/test/util.py	Wed May 20 09:34:42 2009 +0200
@@ -110,7 +110,14 @@
             raise self.failureException(msg)
 
     def setUp(self):
-        """Configure and connect three Runtimes."""
+        """Configure and connect three Runtimes.
+
+        .. warning::
+        
+           Subclasses that override this method *must* remember to do
+           a super-call to it. Otherwise the runtimes wont be
+           connected and :meth:`tearDown` wont work.
+        """
         # Our standard 65 bit Blum prime
         self.Zp = GF(30916444023318367583)
 
@@ -139,6 +146,12 @@
         interrupted by a C{TimeoutError}, and so we do it here in all
         cases to avoid leaving scheduled calls lying around in the
         reactor.
+
+        .. warning::
+        
+           Subclasses that override this method *must* remember to do
+           a super-call to it. Otherwise the runtimes wont be
+           disconnected and your test case will hang.
         """
         for protocol in self.protocols.itervalues():
             protocol.transport.close()