Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
agamsanghera committed Jan 18, 2025
1 parent 8583d13 commit 2023581
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_augment.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ def test_augment():
# call individual tests
assert np.isclose(blur(input),output_image,atol=.01).all, "Incorrect output, function not working as expected"
# Check if invalid functions raise a ValueError
invalid_operations = [(blur,1)(flip, 1), (scale, 0.5), (grayscale, 0.7), (lambda x: x, 1)] # Invalid function (lambda)
invalid_operations = [(blur,1),(flip, 1), (scale, 0.5), (grayscale, 0.7), (lambda x: x, 1)] # Invalid function (lambda)
with pytest.raises(ValueError, match="Function <lambda> is not allowed"):
augment(input_image, invalid_operations)

invalid_operations_2 = [(flip, 1), (scale, 0.5), (blur, 3), (lambda x: x, 1)]
invalid_operations_2 = [(flip, 1), (scale, 0.5), (blur, 1), (lambda x: x, 1)]
with pytest.raises(ValueError):
augment(input_image, invalid_operations_2)

0 comments on commit 2023581

Please sign in to comment.