viff

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 diff
     1.1 --- a/viff/test/util.py	Thu May 14 12:01:54 2009 +0200
     1.2 +++ b/viff/test/util.py	Wed May 20 09:34:42 2009 +0200
     1.3 @@ -110,7 +110,14 @@
     1.4              raise self.failureException(msg)
     1.5  
     1.6      def setUp(self):
     1.7 -        """Configure and connect three Runtimes."""
     1.8 +        """Configure and connect three Runtimes.
     1.9 +
    1.10 +        .. warning::
    1.11 +        
    1.12 +           Subclasses that override this method *must* remember to do
    1.13 +           a super-call to it. Otherwise the runtimes wont be
    1.14 +           connected and :meth:`tearDown` wont work.
    1.15 +        """
    1.16          # Our standard 65 bit Blum prime
    1.17          self.Zp = GF(30916444023318367583)
    1.18  
    1.19 @@ -139,6 +146,12 @@
    1.20          interrupted by a C{TimeoutError}, and so we do it here in all
    1.21          cases to avoid leaving scheduled calls lying around in the
    1.22          reactor.
    1.23 +
    1.24 +        .. warning::
    1.25 +        
    1.26 +           Subclasses that override this method *must* remember to do
    1.27 +           a super-call to it. Otherwise the runtimes wont be
    1.28 +           disconnected and your test case will hang.
    1.29          """
    1.30          for protocol in self.protocols.itervalues():
    1.31              protocol.transport.close()