viff

changeset 589:b1397f54a28c

Fixed trailing whitespace, rewrapped a comment.
author Martin Geisler <mg@daimi.au.dk>
date Thu, 20 Mar 2008 00:08:33 +0100
parents 7c14124ca29e
children 8a79bf7ed805
files viff/test/util.py
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line diff
     1.1 --- a/viff/test/util.py	Thu Mar 20 00:02:34 2008 +0100
     1.2 +++ b/viff/test/util.py	Thu Mar 20 00:08:33 2008 +0100
     1.3 @@ -41,6 +41,7 @@
     1.4  
     1.5      The three runtimes are connected by L{create_loopback_runtime}.
     1.6      """
     1.7 +
     1.8      def wrapper(self):
     1.9  
    1.10          def shutdown_protocols(result, runtime):
    1.11 @@ -85,7 +86,6 @@
    1.12      return wrapper
    1.13  
    1.14  
    1.15 -
    1.16  class RuntimeTestCase(TestCase):
    1.17  
    1.18      #: Number of players to test.
    1.19 @@ -94,14 +94,14 @@
    1.20      threshold = 1
    1.21      #: Default Runtime class to instantiate.
    1.22      runtime_class = Runtime
    1.23 -    
    1.24 +
    1.25      #: A dictionary mapping player ids to pseudorandom generators.
    1.26      #:
    1.27      #: The generators have all been seeded with the same seed, which
    1.28      #: is again obtained from the viff.util.rand generator. A unit
    1.29 -    #: test should use these genrators when all players need to agree 
    1.30 -    #: on the same randomness, e.g. to select the same random number or
    1.31 -    #: to sample the same subsequence from a sequence.
    1.32 +    #: test should use these genrators when all players need to agree
    1.33 +    #: on the same randomness, e.g. to select the same random number
    1.34 +    #: or to sample the same subsequence from a sequence.
    1.35      shared_rand = None
    1.36  
    1.37      def assert_type(self, var, wanted_type):
    1.38 @@ -117,11 +117,11 @@
    1.39  
    1.40          configs = generate_configs(self.num_players, self.threshold)
    1.41          self.protocols = {}
    1.42 -        
    1.43 +
    1.44          # initialize the dictionary of random generators
    1.45          seed = rand.random()
    1.46 -        self.shared_rand = dict([(player_id, Random(seed)) 
    1.47 -                  for player_id in range(1,self.num_players + 1)])
    1.48 +        self.shared_rand = dict([(player_id, Random(seed))
    1.49 +                  for player_id in range(1, self.num_players + 1)])
    1.50  
    1.51          # This will be a list of Deferreds which will trigger when the
    1.52          # virtual connections between the players are closed.