Ejemplo n.º 1
0
 def test_bool(self):
     self.assertRaises(TypeError, bool, sectypes.SecFld()(0))
     self.assertRaises(TypeError, bool, sectypes.SecInt()(0))
     self.assertRaises(TypeError, bool, sectypes.SecFxp()(0))
     self.assertRaises(TypeError, bool, sectypes.SecFlt()(0))
Ejemplo n.º 2
0
 def test_SecNum(self):
     sectypes.SecInt(p=2**89 - 1)
     self.assertRaises(ValueError, sectypes.SecInt, p=2**61 - 1)
     sectypes.SecFxp(p=2**89 - 1)
     self.assertRaises(ValueError, sectypes.SecFxp, f=58, p=2**89 - 1)