Skip to content

Commit

Permalink
fix(frontend-python): update bad static indexing tests to use a const…
Browse files Browse the repository at this point in the history
…ant inputset for consistent errors
  • Loading branch information
umut-sahin committed Sep 21, 2023
1 parent e6f5eab commit fc1b52b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def test_bad_static_indexing(helpers):

compiler = fhe.Compiler(lambda x: x[1.5], {"x": "encrypted"})

inputset = [np.random.randint(0, 2**3, size=(3,)) for _ in range(100)]
inputset = [[5, 2, 4]]
with pytest.raises(ValueError) as excinfo:
compiler.compile(inputset, configuration)

Expand All @@ -193,7 +193,7 @@ def test_bad_static_indexing(helpers):

compiler = fhe.Compiler(lambda x: x[slice(1.5, 2.5, None)], {"x": "encrypted"})

inputset = [np.random.randint(0, 2**3, size=(3,)) for _ in range(100)]
inputset = [[5, 2, 4]]
with pytest.raises(ValueError) as excinfo:
compiler.compile(inputset, configuration)

Expand All @@ -206,7 +206,7 @@ def test_bad_static_indexing(helpers):

compiler = fhe.Compiler(lambda x: x[0, 1.5], {"x": "encrypted"})

inputset = [np.random.randint(0, 2**3, size=(3,)) for _ in range(100)]
inputset = [[5, 2, 4]]
with pytest.raises(ValueError) as excinfo:
compiler.compile(inputset, configuration)

Expand Down

0 comments on commit fc1b52b

Please sign in to comment.