changeset 1539:1ffd6d928a7f

Skip tests if pypaillier is not present.
author Janus Dam Nielsen <janus.nielsen@alexandra.dk>
date Tue, 07 Sep 2010 17:58:29 +0200
parents 9d4f9551644c
children 01dc3a6add2e
files viff/test/test_bedoza_runtime.py viff/test/test_bedoza_triple.py
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/viff/test/test_bedoza_runtime.py	Wed Aug 11 16:09:32 2010 +0200
+++ b/viff/test/test_bedoza_runtime.py	Tue Sep 07 17:58:29 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	Wed Aug 11 16:09:32 2010 +0200
+++ b/viff/test/test_bedoza_triple.py	Tue Sep 07 17:58:29 2010 +0200
@@ -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)