def test_modify(self): POS = (0, 0) for img in imgs.get_imgs(): pixel = imgs.wrap(img.getpixel(POS))[0] evald_img = analyse.modify('value ^ 177', img) evald_pixel = imgs.wrap(evald_img.getpixel(POS))[0] self.assertEqual(evald_pixel, pixel ^ 177)
def test_modify_output(self): img = imgs.get_imgs()[0] with imgs.TempFile() as tmp_path: analyse.modify('value ^ 177', img, out_path=tmp_path) self.assertTrue(os.path.isfile(tmp_path))