()
| 870 | |
| 871 | |
| 872 | def 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 | |
| 890 | def test_find_duplicates_to_remove_outfile(): |
nothing calls this directly
no test coverage detected