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

Function test_find_duplicates_to_remove_encoding

tests/test_hashing.py:872–887  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

870
871
872def test_find_duplicates_to_remove_encoding():
873 encoding = {
874 'ukbench00120_resize.jpg': '9fee256239984d71',
875 'ukbench00120_rotation.jpg': '850d513c4fdcbb72',
876 'ukbench00120.jpg': '9fee256239984d71',
877 'ukbench00120_hflip.jpg': 'cabb7237e8cd3824',
878 'ukbench09268.jpg': 'c73c36c2da2f29c9',
879 }
880 phasher = PHash()
881 removal_list = phasher.find_duplicates_to_remove(
882 encoding_map=encoding, max_distance_threshold=10
883 )
884 assert isinstance(removal_list, list)
885 assert removal_list == ['ukbench00120.jpg'] or removal_list == [
886 'ukbench00120_resize.jpg'
887 ]
888
889
890def test_find_duplicates_to_remove_outfile():

Callers

nothing calls this directly

Calls 2

PHashClass · 0.90

Tested by

no test coverage detected