From 15aeb355295340c3eeb9bcca4a80154a1bbc7280 Mon Sep 17 00:00:00 2001 From: Benoit Chevallier-Mames Date: Thu, 16 Sep 2021 19:28:14 +0200 Subject: [PATCH] fix: dot tests were using a single-element inputset closes #372 --- tests/numpy/test_compile.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/numpy/test_compile.py b/tests/numpy/test_compile.py index 1036b0b91..fe7da5ca7 100644 --- a/tests/numpy/test_compile.py +++ b/tests/numpy/test_compile.py @@ -148,15 +148,15 @@ def test_compile_and_run_correctness(function, input_ranges, list_of_arg_names): ), pytest.param( 4, - (0, 8), + (0, 5), ), pytest.param( 8, - (0, 8), + (0, 4), ), pytest.param( 16, - (0, 4), + (0, 3), ), ], ) @@ -164,9 +164,11 @@ def test_compile_and_run_dot_correctness(size, input_range): """Test correctness of results when running a compiled function""" def data_gen(input_range, size): - for i in range(*input_range, size): - vec = list(range(i, min(i + size, input_range[1]))) - yield vec, vec[::-1] + for _ in range(1000): + low, high = input_range + args = [[random.randint(low, high) for _ in range(size)] for __ in range(2)] + + yield args function_parameters = { "x": EncryptedTensor(Integer(64, False), (size,)),