viff

changeset 1053:edf9a6d01c48

Deleted trailing whitespace.
author Martin Geisler <mg@daimi.au.dk>
date Wed, 10 Dec 2008 21:54:17 +0100
parents 4ea259b480b0
children 8bd66841ecdf
files apps/gc-test.py viff/active.py viff/passive.py viff/prss.py viff/test/test_apps.py viff/test/test_runtime.py viff/test/test_util.py
diffstat 7 files changed, 14 insertions(+), 14 deletions(-) [+]
line diff
     1.1 --- a/apps/gc-test.py	Wed Dec 10 21:40:37 2008 +0100
     1.2 +++ b/apps/gc-test.py	Wed Dec 10 21:54:17 2008 +0100
     1.3 @@ -63,7 +63,7 @@
     1.4      def share_next(self, n):
     1.5          if isinstance(n, self.Zp):
     1.6              n = n.value
     1.7 -        
     1.8 +
     1.9          if n % 100 == 0:
    1.10              now = time()
    1.11              memory = memory_usage()
     2.1 --- a/viff/active.py	Wed Dec 10 21:40:37 2008 +0100
     2.2 +++ b/viff/active.py	Wed Dec 10 21:54:17 2008 +0100
     2.3 @@ -61,7 +61,7 @@
     2.4          bracha_ready = {}
     2.5          bracha_sent_ready = {}
     2.6          bracha_delivered = {}
     2.7 -        
     2.8 +
     2.9          def unsafe_broadcast(data_type, message):
    2.10              # Performs a regular broadcast without any guarantees. In
    2.11              # other words, it sends the message to each player except
     3.1 --- a/viff/passive.py	Wed Dec 10 21:40:37 2008 +0100
     3.2 +++ b/viff/passive.py	Wed Dec 10 21:54:17 2008 +0100
     3.3 @@ -192,7 +192,7 @@
     3.4              return tmp * tmp
     3.5          else:
     3.6              return share * (share ** (exponent-1))
     3.7 -    
     3.8 +
     3.9      @increment_pc
    3.10      def xor(self, share_a, share_b):
    3.11          field = getattr(share_a, "field", getattr(share_b, "field", None))
     4.1 --- a/viff/prss.py	Wed Dec 10 21:40:37 2008 +0100
     4.2 +++ b/viff/prss.py	Wed Dec 10 21:54:17 2008 +0100
     4.3 @@ -171,7 +171,7 @@
     4.4      >>> from shamir import recombine
     4.5      >>> recombine([(Zp(1), Zp(4)), (Zp(2), Zp(0)), (Zp(3), Zp(11))])
     4.6      {0}
     4.7 -    """    
     4.8 +    """
     4.9      # We start by generating t random numbers for each subset. This is
    4.10      # very similar to calling random_replicated_sharing t times, but
    4.11      # by doing it like this we immediatedly get the nesting we want.
     5.1 --- a/viff/test/test_apps.py	Wed Dec 10 21:40:37 2008 +0100
     5.2 +++ b/viff/test/test_apps.py	Wed Dec 10 21:54:17 2008 +0100
     5.3 @@ -97,14 +97,14 @@
     5.4          m1 = execute("millionaires.py", "--no-ssl", "trial-1.ini")
     5.5          m2 = execute("millionaires.py", "--no-ssl", "trial-2.ini")
     5.6          m3 = execute("millionaires.py", "--no-ssl", "trial-3.ini")
     5.7 -        
     5.8 +
     5.9          result = gatherResults([m1, m2, m3])
    5.10          result.addCallback(check_outputs)
    5.11          return result
    5.12  
    5.13      def test_share_open(self):
    5.14          """Test apps/share-open.py."""
    5.15 -        
    5.16 +
    5.17          def check_outputs(outputs):
    5.18              for o in outputs:
    5.19                  self.assertIn("opened a: %s" % GF256(17), o)
    5.20 @@ -114,14 +114,14 @@
    5.21          p1 = execute("share-open.py", "trial-1.ini", "17")
    5.22          p2 = execute("share-open.py", "trial-2.ini", "40")
    5.23          p3 = execute("share-open.py", "trial-3.ini", "235")
    5.24 -        
    5.25 +
    5.26          result = gatherResults([p1, p2, p3])
    5.27          result.addCallback(check_outputs)
    5.28          return result
    5.29  
    5.30      def test_prss_and_open(self):
    5.31          """Test apps/prss-and-open.py."""
    5.32 -        
    5.33 +
    5.34          def check_outputs(outputs):
    5.35              lines = []
    5.36              for o in outputs:
    5.37 @@ -136,7 +136,7 @@
    5.38          p1 = execute("prss-and-open.py", "trial-1.ini")
    5.39          p2 = execute("prss-and-open.py", "trial-2.ini")
    5.40          p3 = execute("prss-and-open.py", "trial-3.ini")
    5.41 -        
    5.42 +
    5.43          result = gatherResults([p1, p2, p3])
    5.44          result.addCallback(check_outputs)
    5.45          return result
     6.1 --- a/viff/test/test_runtime.py	Wed Dec 10 21:40:37 2008 +0100
     6.2 +++ b/viff/test/test_runtime.py	Wed Dec 10 21:54:17 2008 +0100
     6.3 @@ -55,7 +55,7 @@
     6.4  
     6.5      a = 1337
     6.6      b = 123
     6.7 -    
     6.8 +
     6.9      def _verify(self, runtime, result, expected):
    6.10          self.assert_type(result, Share)
    6.11          opened = runtime.open(result)
     7.1 --- a/viff/test/test_util.py	Wed Dec 10 21:40:37 2008 +0100
     7.2 +++ b/viff/test/test_util.py	Wed Dec 10 21:54:17 2008 +0100
     7.3 @@ -43,12 +43,12 @@
     7.4  
     7.5          os.environ['VIFF_FAKE'] = "*"
     7.6          for module in self._modules:
     7.7 -            reload(module)        
     7.8 +            reload(module)
     7.9  
    7.10      def tearDown(self):
    7.11          del os.environ['VIFF_FAKE']
    7.12          for module in self._modules:
    7.13 -            reload(module)        
    7.14 +            reload(module)
    7.15  
    7.16      def test_shamir_share(self):
    7.17          from viff.shamir import share
    7.18 @@ -139,7 +139,7 @@
    7.19              """Callbacks which return a Deferred."""
    7.20              self.calls.append("return_b")
    7.21              return b
    7.22 -        
    7.23 +
    7.24          a.addCallback(self.calls.append)
    7.25          a.addCallback(return_b)
    7.26  
    7.27 @@ -164,7 +164,7 @@
    7.28              """Callbacks which return a Deferred and an integer."""
    7.29              self.calls.append("return_mix")
    7.30              return (b, 42)
    7.31 -        
    7.32 +
    7.33          a.addCallback(self.calls.append)
    7.34          a.addCallback(return_mix)
    7.35