(
hasher, mocker_load_image, mocker_hash_func
)
| 148 | |
| 149 | |
| 150 | def test_encode_image_accepts_non_posixpath( |
| 151 | hasher, mocker_load_image, mocker_hash_func |
| 152 | ): |
| 153 | ret_val = np.zeros((2, 2)) |
| 154 | hasher.encode_image(image_file=PATH_SINGLE_IMAGE_STRING) |
| 155 | mocker_load_image.assert_called_with( |
| 156 | image_file=PATH_SINGLE_IMAGE, grayscale=True, target_size=(8, 8) |
| 157 | ) |
| 158 | np.testing.assert_array_equal(ret_val, mocker_hash_func.call_args[0][0]) |
| 159 | |
| 160 | |
| 161 | # _encoder |
nothing calls this directly
no test coverage detected