(self, input_param, input_data)
| 52 | |
| 53 | @parameterized.expand(TEST_VALUES) |
| 54 | def test_value(self, input_param, input_data): |
| 55 | for im_type in TEST_NDARRAYS_ALL: |
| 56 | with self.subTest(im_type=im_type): |
| 57 | cropper = RandScaleCrop(**input_param) |
| 58 | result = cropper(im_type(input_data)) |
| 59 | roi = [(2 - i // 2, 2 + i - i // 2) for i in cropper._size] |
| 60 | assert_allclose(result, input_data[:, roi[0][0] : roi[0][1], roi[1][0] : roi[1][1]], type_test="tensor") |
| 61 | |
| 62 | @parameterized.expand(TEST_RANDOM_SHAPES) |
| 63 | def test_random_shape(self, input_param, input_shape, expected_shape): |
nothing calls this directly
no test coverage detected