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

Method test_result

tests/apps/test_check_hash.py:37–44  ·  view source on GitHub ↗
(self, md5_value, t, expected_result)

Source from the content-addressed store, hash-verified

35
36 @parameterized.expand([TEST_CASE_1, TEST_CASE_2, TEST_CASE_3, TEST_CASE_4, TEST_CASE_5])
37 def test_result(self, md5_value, t, expected_result):
38 test_image = np.ones((5, 5, 3))
39 with tempfile.TemporaryDirectory() as tempdir:
40 filename = os.path.join(tempdir, "test_file.png")
41 test_image.tofile(filename)
42
43 result = check_hash(filename, md5_value, hash_type=t)
44 self.assertTrue(result == expected_result)
45
46 def test_hash_type_error(self):
47 with self.assertRaises(ValueError):

Callers

nothing calls this directly

Calls 1

check_hashFunction · 0.90

Tested by

no test coverage detected