(self, input_param, img, out, expected_shape)
| 96 | class TestActivations(unittest.TestCase): |
| 97 | @parameterized.expand(TEST_CASES) |
| 98 | def test_value_shape(self, input_param, img, out, expected_shape): |
| 99 | result = Activations(**input_param)(img) |
| 100 | |
| 101 | def _compare(ret, out, shape): |
| 102 | assert_allclose(ret, out, rtol=1e-3, type_test=False) |
| 103 | self.assertTupleEqual(ret.shape, shape) |
| 104 | |
| 105 | if isinstance(result, (list, tuple)): |
| 106 | for r, e in zip(result, out): |
| 107 | _compare(r, e, expected_shape) |
| 108 | else: |
| 109 | _compare(result, out, expected_shape) |
| 110 | |
| 111 | @parameterized.expand([TEST_CASE_4, TEST_CASE_5, TEST_CASE_6, TEST_CASE_7]) |
| 112 | def test_monai_activations_value_shape(self, input_param, img, out, expected_shape): |
nothing calls this directly
no test coverage detected