about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorArun Isaac2025-07-15 16:39:44 +0100
committerArun Isaac2025-07-17 01:48:49 +0100
commit402a99a400cc5bfdd27349e8e84d54f46646e78c (patch)
treed9105df7e9f57bf8f6795f3c1305abc377a9e374 /tests
parente3db7f74c862b3be9ff9e7371ab600326b2d9cd9 (diff)
downloadpyhegp-402a99a400cc5bfdd27349e8e84d54f46646e78c.tar.gz
pyhegp-402a99a400cc5bfdd27349e8e84d54f46646e78c.tar.lz
pyhegp-402a99a400cc5bfdd27349e8e84d54f46646e78c.zip
Use default array shapes testing encryption/decryption.
It may be better to sample a smaller set of matrices finely than a
large set of matrices coarsely.

* tests/test_pyhegp.py (test_hegp_encryption_decryption_are_inverses):
Use default array shapes testing encryption/decryption.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_pyhegp.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_pyhegp.py b/tests/test_pyhegp.py
index 567ee17..61358e5 100644
--- a/tests/test_pyhegp.py
+++ b/tests/test_pyhegp.py
@@ -25,18 +25,17 @@ from pyhegp.pyhegp import hegp_encrypt, hegp_decrypt, random_key
 
 @given(st.one_of(
     arrays("int32",
-           array_shapes(min_dims=2, max_dims=2, min_side=2, max_side=100),
+           array_shapes(min_dims=2, max_dims=2),
            elements=st.integers(min_value=0, max_value=2)),
     # The array above is the only realistic input, but we test more
     # kinds of inputs for good measure.
     arrays("int32",
-           array_shapes(min_dims=2, max_dims=2, min_side=2, max_side=100),
+           array_shapes(min_dims=2, max_dims=2),
            elements=st.integers(min_value=0, max_value=100)),
     arrays("float64",
-           array_shapes(min_dims=2, max_dims=2, min_side=2, max_side=100),
+           array_shapes(min_dims=2, max_dims=2),
            elements=st.floats(min_value=0, max_value=100)))
 )
-@settings(deadline=None)
 def test_hegp_encryption_decryption_are_inverses(plaintext):
     rng = np.random.default_rng()
     key = random_key(rng, len(plaintext))