Skip to content

Commit

Permalink
add extra tests for axis in RandomMotion
Browse files Browse the repository at this point in the history
  • Loading branch information
blakedewey committed Jul 6, 2024
1 parent 08357f0 commit 1d8761c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/transforms/augmentation/test_random_motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,15 @@ def test_wrong_image_interpolation_type(self):
def test_wrong_image_interpolation_value(self):
with pytest.raises(ValueError):
RandomMotion(image_interpolation='wrong')

def test_out_of_range_axis(self):
with pytest.raises(ValueError):
RandomMotion(axes=3)

def test_out_of_range_axis_in_tuple(self):
with pytest.raises(ValueError):
RandomMotion(axes=(0, -1, 2))

def test_wrong_axes_type(self):
with pytest.raises(ValueError):
RandomMotion(axes=None)

0 comments on commit 1d8761c

Please sign in to comment.