def calc_sig2(pairs): files = [x[1][0] for x in pairs] sigs = get_image_signatures2(files) res = {} if sigs is not None: for i in range(len(pairs)): contentid, files = pairs[i] res[contentid] = sigs[i] return res
def test_signature2(self): signatures = get_image_signatures2( ["src/test/images/all_black_rgb.png", "does not exists", "Makefile", "src/test/images/all_white_rgb.png", "src/test/images/pattern1.png"]) if signatures is not None: self.assertEqual( signatures, ['ffffffffffffffff', None, None, '0000000000000000', 'f8f8f8ffff1f1f1f'])
def test_signature2_for_coverage(self): CAUSE_UNEQUAL_LINES.append(1) get_image_signatures2(["src/test/images/all_black_rgb.png"]) self.assert_no_exception()