def test_repackage_pixel_values_into_tuples_with_rgba_pixel_type(self): pixel_values = [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2] expected_return_value = [(0, 0, 0, 0), (1, 1, 1, 1), (2, 2, 2, 2)] for pixel in enumerate(stegano.repackage_pixel_values_into_tuples(pixel_values, "rgba")): self.assertEqual(expected_return_value[pixel[0]], pixel[1])
def test_repackage_pixel_values_into_tuples_with_rgb_pixel_type(self): pixel_values = [254, 254, 255, 115, 115, 114, 255, 254, 255] expected_return_value = [(254, 254, 255), (115, 115, 114), (255, 254, 255)] for pixel in enumerate(stegano.repackage_pixel_values_into_tuples(pixel_values, "rgb")): self.assertEqual(expected_return_value[pixel[0]], pixel[1])