changeset 1542:8e06a2598579

Merged.
author Thomas P Jakobsen <tpj@cs.au.dk>
date Mon, 20 Sep 2010 21:56:39 +0200
parents d2f48fac982a 01dc3a6add2e
children 7db2fafaab44
files viff/test/test_bedoza_triple.py
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/viff/test/test_bedoza_runtime.py	Mon Sep 20 21:50:37 2010 +0200
+++ b/viff/test/test_bedoza_runtime.py	Mon Sep 20 21:56:39 2010 +0200
@@ -525,3 +525,8 @@
         d.addCallback(check)
         return d
     
+def skip_tests(module_name):
+    BeDOZaBasicCommandsTest.skip = "Skipped due to missing " + module_name + " module."
+
+if not pypaillier:
+    skip_tests("pypaillier")
--- a/viff/test/test_bedoza_triple.py	Mon Sep 20 21:50:37 2010 +0200
+++ b/viff/test/test_bedoza_triple.py	Mon Sep 20 21:56:39 2010 +0200
@@ -213,7 +213,7 @@
     gen = PartialShareGenerator(Zp, runtime, share_random, paillier)
     return gen.generate_random_shares(n)
 
-class ParialShareGeneratorTest(BeDOZaTestCase):
+class PartialShareGeneratorTest(BeDOZaTestCase):
     num_players = 3
  
     @protocol
@@ -411,7 +411,7 @@
         random = Random(283883)        
         triple_generator = TripleGenerator(runtime, p, random)
 
-        triples = triple_generator.generate_triples(100)
+        triples = triple_generator.generate_triples(10)
 
         def check((a, b, c)):
             self.assertEquals(c, a * b)