(hasher, mocker)
| 128 | |
| 129 | |
| 130 | def test_encode_image_wrong_dim_input_array(hasher, mocker): |
| 131 | image_arr_4d = np.random.random((3, 3, 2, 5)) |
| 132 | check_image_array_hash_mocker = mocker.patch( |
| 133 | 'imagededup.methods.hashing.check_image_array_hash' |
| 134 | ) |
| 135 | with pytest.raises(ValueError): |
| 136 | hasher.encode_image(image_array=image_arr_4d) |
| 137 | check_image_array_hash_mocker.assert_called_once_with(image_arr_4d) |
| 138 | |
| 139 | |
| 140 | def test_encode_image_returns_none_image_pp_not_array(hasher, mocker): |
nothing calls this directly
no test coverage detected