(self, md5_value, t, expected_result)
| 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): |
nothing calls this directly
no test coverage detected