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

Method test_value

tests/transforms/test_to_pil.py:45–48  ·  view source on GitHub ↗
(self, test_data)

Source from the content-addressed store, hash-verified

43 @parameterized.expand(TESTS)
44 @skipUnless(has_pil, "Requires `pillow` package.")
45 def test_value(self, test_data):
46 result = ToPIL()(test_data)
47 self.assertTrue(isinstance(result, PILImageImage))
48 assert_allclose(np.array(result), test_data, type_test=False)
49
50
51if __name__ == "__main__":

Callers

nothing calls this directly

Calls 3

ToPILClass · 0.90
assert_allcloseFunction · 0.90
arrayMethod · 0.80

Tested by

no test coverage detected