mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Test MRL save/load roundtrip
This commit is contained in:
parent
4c86ef0b52
commit
ffcd945ae7
|
@ -261,6 +261,19 @@ class MorphTests(PillowTestCase):
|
|||
# Act / Assert
|
||||
self.assertRaises(Exception, lambda: mop.load_lut(invalid_mrl))
|
||||
|
||||
def test_roundtrip_mrl(self):
|
||||
# Arrange
|
||||
tempfile = self.tempfile('temp.mrl')
|
||||
mop = ImageMorph.MorphOp(op_name='corner')
|
||||
initial_lut = mop.lut
|
||||
|
||||
# Act
|
||||
mop.save_lut(tempfile)
|
||||
mop.load_lut(tempfile)
|
||||
|
||||
# Act / Assert
|
||||
self.assertEqual(mop.lut, initial_lut)
|
||||
|
||||
def test_set_lut(self):
|
||||
# Arrange
|
||||
lb = ImageMorph.LutBuilder(op_name='corner')
|
||||
|
|
Loading…
Reference in New Issue
Block a user