(self)
| 24 | |
| 25 | class TestRandRotate90(NumpyImageTestCase2D): |
| 26 | def test_default(self): |
| 27 | rotate = RandRotate90() |
| 28 | for p in TEST_NDARRAYS_ALL: |
| 29 | rotate.set_random_state(123) |
| 30 | im = p(self.imt[0]) |
| 31 | call_param = {"img": im} |
| 32 | rotated = rotate(**call_param) |
| 33 | test_local_inversion(rotate, rotated, im) |
| 34 | expected = [np.rot90(channel, 0, (0, 1)) for channel in self.imt[0]] |
| 35 | expected = np.stack(expected) |
| 36 | assert_allclose(rotated, p(expected), rtol=1.0e-5, atol=1.0e-8, type_test="tensor") |
| 37 | |
| 38 | # test lazy |
| 39 | test_resampler_lazy(rotate, rotated, call_param=call_param, seed=123) |
| 40 | rotate.lazy = False |
| 41 | |
| 42 | def test_k(self): |
| 43 | init_param = {"max_k": 2} |
nothing calls this directly
no test coverage detected