Skip to content

Commit

Permalink
Test MRL save/load roundtrip
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed May 30, 2017
1 parent 4c86ef0 commit ffcd945
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Tests/test_imagemorph.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,19 @@ def test_load_invalid_mrl(self):
# 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')
Expand Down

0 comments on commit ffcd945

Please sign in to comment.