viff

changeset 1235:3fba16c51e71

We skippe the tests because the commit module is not currently included in VIFF.
author Janus Dam Nielsen <janus.nielsen@alexandra.dk>
date Wed, 07 Oct 2009 12:02:23 +0200
parents 82e3597871ae
children 5aa1a609ae35
files viff/test/test_orlandi_runtime.py
diffstat 1 files changed, 59 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/viff/test/test_orlandi_runtime.py	Wed Oct 07 12:02:20 2009 +0200
     1.2 +++ b/viff/test/test_orlandi_runtime.py	Wed Oct 07 12:02:23 2009 +0200
     1.3 @@ -26,7 +26,7 @@
     1.4  
     1.5  from viff.util import rand
     1.6  
     1.7 -import commitment
     1.8 +# import commitment
     1.9  
    1.10  
    1.11  def _get_triple(runtime, field):
    1.12 @@ -68,6 +68,8 @@
    1.13          share.addCallback(check)
    1.14          return share
    1.15  
    1.16 +    test_secret_share.skip = "Commitment module is not included in VIFF."
    1.17 +
    1.18      @protocol
    1.19      def test_open_secret_share(self, runtime):
    1.20          """Test sharing and open of a number."""
    1.21 @@ -85,6 +87,8 @@
    1.22          d.addCallback(check)
    1.23          return d
    1.24  
    1.25 +    test_open_secret_share.skip = "Commitment module is not included in VIFF."
    1.26 +
    1.27      @protocol
    1.28      def test_random_share(self, runtime):
    1.29          """Test creation of a random shared number."""
    1.30 @@ -99,6 +103,7 @@
    1.31          d.addCallback(check)
    1.32          return d
    1.33   
    1.34 +    test_random_share.skip = "Commitment module is not included in VIFF."
    1.35  
    1.36      @protocol
    1.37      def test_sum(self, runtime):
    1.38 @@ -127,6 +132,8 @@
    1.39          d.addCallback(check)
    1.40          return d
    1.41  
    1.42 +    test_sum.skip = "Commitment module is not included in VIFF."
    1.43 +
    1.44      @protocol
    1.45      def test_sum_plus(self, runtime):
    1.46          """Test addition of two numbers."""
    1.47 @@ -154,6 +161,8 @@
    1.48          d.addCallback(check)
    1.49          return d
    1.50  
    1.51 +    test_sum_plus.skip = "Commitment module is not included in VIFF."
    1.52 +
    1.53      @protocol
    1.54      def test_sum_constant(self, runtime):
    1.55          """Test addition of two numbers."""
    1.56 @@ -176,6 +185,8 @@
    1.57          d.addCallback(check)
    1.58          return d
    1.59  
    1.60 +    test_sum_constant.skip = "Commitment module is not included in VIFF."
    1.61 +
    1.62      @protocol
    1.63      def test_sub(self, runtime):
    1.64          """Test subtration of two numbers."""
    1.65 @@ -203,6 +214,8 @@
    1.66          d.addCallback(check)
    1.67          return d
    1.68  
    1.69 +    test_sub.skip = "Commitment module is not included in VIFF."
    1.70 +
    1.71      @protocol
    1.72      def test_sub_minus(self, runtime):
    1.73          """Test subtration of two numbers."""
    1.74 @@ -230,6 +243,8 @@
    1.75          d.addCallback(check)
    1.76          return d
    1.77  
    1.78 +    test_sub_minus.skip = "Commitment module is not included in VIFF."
    1.79 +
    1.80      @protocol
    1.81      def test_sub_constant(self, runtime):
    1.82          """Test subtration of two numbers."""
    1.83 @@ -252,6 +267,7 @@
    1.84          d.addCallback(check)
    1.85          return d
    1.86  
    1.87 +    test_sub_constant.skip = "Commitment module is not included in VIFF."
    1.88  
    1.89  class OrlandiAdvancedCommandsTest(RuntimeTestCase):
    1.90      """Test for advanced commands."""
    1.91 @@ -277,6 +293,8 @@
    1.92          d.addCallback(check)
    1.93          return d
    1.94  
    1.95 +    test_shift.skip = "Commitment module is not included in VIFF."
    1.96 +
    1.97      @protocol
    1.98      def test_shift_two_inputters(self, runtime):
    1.99          """Test addition of the shift command."""
   1.100 @@ -293,6 +311,8 @@
   1.101          d2.addCallback(check)
   1.102          return DeferredList([d1, d2])
   1.103  
   1.104 +    test_shift_two_inputters.skip = "Commitment module is not included in VIFF."
   1.105 +
   1.106      @protocol
   1.107      def test_shift_two_consequtive_inputters(self, runtime):
   1.108          """Test addition of the shift command."""
   1.109 @@ -309,6 +329,8 @@
   1.110          r.addCallback(r1)
   1.111          return r
   1.112  
   1.113 +    test_shift_two_consequtive_inputters.skip = "Commitment module is not included in VIFF."
   1.114 +
   1.115      @protocol
   1.116      def test_shift_two_consequtive_inputters2(self, runtime):
   1.117          """Test addition of the shift command."""
   1.118 @@ -328,6 +350,8 @@
   1.119          r.addCallback(r1)
   1.120          return r
   1.121  
   1.122 +    test_shift_two_consequtive_inputters2.skip = "Commitment module is not included in VIFF."
   1.123 +
   1.124      @protocol
   1.125      def test_input(self, runtime):
   1.126          """Test of many uses of the input command."""
   1.127 @@ -350,6 +374,8 @@
   1.128          shares_ready = gather_shares(a_shares + b_shares)
   1.129          return shares_ready
   1.130  
   1.131 +    test_input.skip = "Commitment module is not included in VIFF."
   1.132 +
   1.133      @protocol
   1.134      def test_basic_multiply(self, runtime):
   1.135          """Test multiplication of two numbers."""
   1.136 @@ -371,6 +397,8 @@
   1.137          d.addCallback(check)
   1.138          return d
   1.139  
   1.140 +    test_basic_multiply.skip = "Commitment module is not included in VIFF."
   1.141 +
   1.142      @protocol
   1.143      def test_mul_mul(self, runtime):
   1.144          """Test multiplication of two numbers."""
   1.145 @@ -391,6 +419,8 @@
   1.146          d.addCallback(check)
   1.147          return d
   1.148  
   1.149 +    test_mul_mul.skip = "Commitment module is not included in VIFF."
   1.150 +
   1.151      @protocol
   1.152      def test_basic_multiply_constant_right(self, runtime):
   1.153          """Test multiplication of two numbers."""
   1.154 @@ -411,6 +441,8 @@
   1.155          d.addCallback(check)
   1.156          return d
   1.157  
   1.158 +    test_basic_multiply_constant_right.skip = "Commitment module is not included in VIFF."
   1.159 +
   1.160      @protocol
   1.161      def test_basic_multiply_constant_left(self, runtime):
   1.162          """Test multiplication of two numbers."""
   1.163 @@ -431,6 +463,8 @@
   1.164          d.addCallback(check)
   1.165          return d
   1.166  
   1.167 +    test_basic_multiply_constant_left.skip = "Commitment module is not included in VIFF."
   1.168 +
   1.169      @protocol
   1.170      def test_constant_multiplication_constant_left(self, runtime):
   1.171          """Test multiplication of two numbers."""
   1.172 @@ -450,6 +484,8 @@
   1.173          d.addCallback(check)
   1.174          return d
   1.175  
   1.176 +    test_constant_multiplication_constant_left.skip = "Commitment module is not included in VIFF."
   1.177 +
   1.178      @protocol
   1.179      def test_constant_multiplication_constant_right(self, runtime):
   1.180          """Test multiplication of two numbers."""
   1.181 @@ -469,6 +505,8 @@
   1.182          d.addCallback(check)
   1.183          return d
   1.184  
   1.185 +    test_constant_multiplication_constant_right.skip = "Commitment module is not included in VIFF."
   1.186 +
   1.187      @protocol
   1.188      def test_constant_multiplication_constant_None(self, runtime):
   1.189          """Test multiplication of two numbers."""
   1.190 @@ -481,6 +519,8 @@
   1.191          x2 = runtime.shift([1], self.Zp, x1)
   1.192          y2 = runtime.shift([1], self.Zp, y1)
   1.193  
   1.194 +    test_constant_multiplication_constant_None.skip = "Commitment module is not included in VIFF."
   1.195 +
   1.196      @protocol
   1.197      def test_sum_poly(self, runtime):
   1.198          """Test implementation of sum_poly."""
   1.199 @@ -498,6 +538,8 @@
   1.200          self.assertEquals(rho2, 29)
   1.201          self.assertEquals(Cx, 29)
   1.202          return x
   1.203 +
   1.204 +    test_sum_poly.skip = "Commitment module is not included in VIFF."
   1.205   
   1.206      @protocol
   1.207      def test_sum_poly(self, runtime):
   1.208 @@ -521,6 +563,8 @@
   1.209          self.assertEquals(Cx, Cf1**3 * Cf2**9 * Cf3**27)
   1.210          return x
   1.211  
   1.212 +    test_sum_poly.skip = "Commitment module is not included in VIFF."
   1.213 +
   1.214      @protocol
   1.215      def test_delta(self, runtime):
   1.216          """Test implementation of compute_delta."""
   1.217 @@ -538,6 +582,8 @@
   1.218   
   1.219          return delta
   1.220  
   1.221 +    test_delta.skip = "Commitment module is not included in VIFF."
   1.222 +
   1.223      @protocol
   1.224      def test_leak_mul(self, runtime):
   1.225          """Test leaktolerant multiplication of two numbers."""
   1.226 @@ -570,6 +616,7 @@
   1.227          self.assertEquals(z2, None)
   1.228          return z2
   1.229  
   1.230 +    test_leak_mul.skip = "Commitment module is not included in VIFF."
   1.231  
   1.232  class TripleGenTest(RuntimeTestCase):
   1.233      """Test for generation of triples."""
   1.234 @@ -601,6 +648,8 @@
   1.235          d.addCallbacks(open, runtime.error_handler)
   1.236          return d
   1.237  
   1.238 +    test_tripleGen.skip = "Commitment module is not included in VIFF."
   1.239 +
   1.240      @protocol
   1.241      def test_tripleGen2(self, runtime):
   1.242          """Test the triple_gen command."""
   1.243 @@ -627,6 +676,7 @@
   1.244          d.addCallbacks(open, runtime.error_handler)
   1.245          return d
   1.246  
   1.247 +    test_tripleGen2.skip = "Commitment module is not included in VIFF."
   1.248      
   1.249      @protocol
   1.250      def test_tripleTest(self, runtime):
   1.251 @@ -648,6 +698,8 @@
   1.252          d.addCallbacks(open, runtime.error_handler)
   1.253          return d
   1.254  
   1.255 +    test_tripleTest.skip = "Commitment module is not included in VIFF."
   1.256 +
   1.257      @protocol
   1.258      def test_random_triple(self, runtime):
   1.259          """Test the triple_combiner command."""
   1.260 @@ -678,6 +730,8 @@
   1.261          d.addCallbacks(open, runtime.error_handler)
   1.262          return d
   1.263  
   1.264 +    test_random_triple.skip = "Commitment module is not included in VIFF."
   1.265 +
   1.266      @protocol
   1.267      def test_random_triple3_parallel(self, runtime):
   1.268          """Test the triple_combiner command."""
   1.269 @@ -711,6 +765,8 @@
   1.270          d.addCallbacks(open, runtime.error_handler)
   1.271          return d
   1.272  
   1.273 +    test_random_triple3_parallel.skip = "Commitment module is not included in VIFF."
   1.274 +
   1.275      @protocol
   1.276      def test_random_triple_parallel(self, runtime):
   1.277          """Test the triple_combiner command."""
   1.278 @@ -765,3 +821,5 @@
   1.279  
   1.280          runtime.schedule_callback(shares_ready, cont)
   1.281          return shares_ready
   1.282 +
   1.283 +    test_random_triple_parallel.skip = "Commitment module is not included in VIFF."