From 1d8761cbb671bf827c4f1011c4966b48fb058f6e Mon Sep 17 00:00:00 2001 From: Blake Dewey Date: Sat, 6 Jul 2024 12:55:48 -0400 Subject: [PATCH] add extra tests for axis in RandomMotion --- tests/transforms/augmentation/test_random_motion.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/transforms/augmentation/test_random_motion.py b/tests/transforms/augmentation/test_random_motion.py index 69678434..ec2f9676 100644 --- a/tests/transforms/augmentation/test_random_motion.py +++ b/tests/transforms/augmentation/test_random_motion.py @@ -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)