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

Function test_encode_image_accepts_non_posixpath

tests/test_hashing.py:150–158  ·  view source on GitHub ↗
(
    hasher, mocker_load_image, mocker_hash_func
)

Source from the content-addressed store, hash-verified

148
149
150def 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

Callers

nothing calls this directly

Calls 1

encode_imageMethod · 0.45

Tested by

no test coverage detected