viff

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 diff
     1.1 --- a/viff/test/test_bedoza_runtime.py	Wed Aug 11 16:09:32 2010 +0200
     1.2 +++ b/viff/test/test_bedoza_runtime.py	Tue Sep 07 17:58:29 2010 +0200
     1.3 @@ -525,3 +525,8 @@
     1.4          d.addCallback(check)
     1.5          return d
     1.6      
     1.7 +def skip_tests(module_name):
     1.8 +    BeDOZaBasicCommandsTest.skip = "Skipped due to missing " + module_name + " module."
     1.9 +
    1.10 +if not pypaillier:
    1.11 +    skip_tests("pypaillier")
     2.1 --- a/viff/test/test_bedoza_triple.py	Wed Aug 11 16:09:32 2010 +0200
     2.2 +++ b/viff/test/test_bedoza_triple.py	Tue Sep 07 17:58:29 2010 +0200
     2.3 @@ -411,7 +411,7 @@
     2.4          random = Random(283883)        
     2.5          triple_generator = TripleGenerator(runtime, p, random)
     2.6  
     2.7 -        triples = triple_generator.generate_triples(100)
     2.8 +        triples = triple_generator.generate_triples(10)
     2.9  
    2.10          def check((a, b, c)):
    2.11              self.assertEquals(c, a * b)