def test_make_linear_lut_not_yet_implemented(self): # Update after FIXME # Arrange from PIL.ImagePalette import make_linear_lut black = 1 white = 255 # Act self.assertRaises(NotImplementedError, lambda: make_linear_lut(black, white))
def test_make_linear_lut(self): # Arrange from PIL.ImagePalette import make_linear_lut black = 0 white = 255 # Act lut = make_linear_lut(black, white) # Assert self.assertIsInstance(lut, list) self.assertEqual(len(lut), 256) # Check values for i in range(0, len(lut)): self.assertEqual(lut[i], i)