Skip to content

Commit 4ebb504

Browse files
committed
Added Failing UnitTest
1 parent 7d9911e commit 4ebb504

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

phe/tests/paillier_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import unittest
2626
import sys
2727
import math
28+
import numpy
2829

2930
from phe import paillier
3031

@@ -1094,6 +1095,10 @@ def testIssue62(self):
10941095
# This will raise OverflowError without bugfix #73.
10951096
priv.decrypt(a + b)
10961097

1098+
class TestNumpyOverflow(unittest.TestCase):
1099+
def testNumpyOverflow(self):
1100+
public_key, private_key = paillier.generate_paillier_keypair()
1101+
private_key.decrypt(public_key.encrypt(numpy.int64(0),precision=2**-12))
10971102

10981103
def main():
10991104
unittest.main()

0 commit comments

Comments
 (0)