From ffcd945ae7f96452787057f6869a2b20640f275d Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 29 May 2017 09:52:31 +0300 Subject: [PATCH] Test MRL save/load roundtrip --- Tests/test_imagemorph.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Tests/test_imagemorph.py b/Tests/test_imagemorph.py index ef9d38fd487..0ce8ac6da07 100644 --- a/Tests/test_imagemorph.py +++ b/Tests/test_imagemorph.py @@ -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')