From dd69ccc241dda8a09bd0c3584fbe4cbe02b4702d Mon Sep 17 00:00:00 2001 From: youben11 Date: Tue, 29 Mar 2022 11:24:49 +0100 Subject: [PATCH] test: reduce negative LUT tests tests started to take a long time --- tests/numpy/test_compile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/numpy/test_compile.py b/tests/numpy/test_compile.py index 43839abe3..200aa83d7 100644 --- a/tests/numpy/test_compile.py +++ b/tests/numpy/test_compile.py @@ -1985,7 +1985,9 @@ def test_compile_and_run_negative_lut_correctness( ) offset = 2 ** (bit_width - 1) - for value in range(-offset, offset): + values = [-offset, -offset // 2, 0, offset // 2, offset - 1] + values.extend([random.randint(-offset, offset - 1) for _ in range(5)]) + for value in values: assert table[value] == function(value + offset) check_is_good_execution(circuit, function, [value + offset])