(self)
| 455 | # skip this test if multiprocessing uses 'spawn', as the check is only basic anyway |
| 456 | @skipUnless(torch.multiprocessing.get_start_method() == "spawn", "requires spawn") |
| 457 | def test_fail(self): |
| 458 | t1 = SpatialPadd("image", [10, 5]) |
| 459 | data = t1(self.all_data["2D"]) |
| 460 | |
| 461 | # Check that error is thrown when inverse are used out of order. |
| 462 | t2 = ResizeWithPadOrCropd("image", [10, 5]) |
| 463 | with self.assertRaises(RuntimeError): |
| 464 | t2.inverse(data) |
| 465 | |
| 466 | @parameterized.expand(N_SAMPLES_TESTS) |
| 467 | def test_inverse_inferred_seg(self, extra_transform): |
nothing calls this directly
no test coverage detected