MCPcopy
hub / github.com/idealo/imagededup / test_encode_image_wrong_dim_input_array

Function test_encode_image_wrong_dim_input_array

tests/test_hashing.py:130–137  ·  view source on GitHub ↗
(hasher, mocker)

Source from the content-addressed store, hash-verified

128
129
130def 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
140def test_encode_image_returns_none_image_pp_not_array(hasher, mocker):

Callers

nothing calls this directly

Calls 1

encode_imageMethod · 0.45

Tested by

no test coverage detected