MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / test_fail

Method test_fail

tests/transforms/inverse/test_inverse.py:457–464  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 3

SpatialPaddClass · 0.90
inverseMethod · 0.45

Tested by

no test coverage detected