def test_3dl_preset(self):
        preset = presets.get_default_preset()
        # test type must be 3D
        self.failUnlessRaises(presets.PresetException,
                              THREEDL_HELPER.check_preset,
                              preset
                              )
        preset[presets.TYPE] = '3D'
        # test shaper attr exists
        self.failUnlessRaises(presets.PresetException,
                              THREEDL_HELPER.check_preset,
                              preset
                              )
        preset[SHAPER] = True
        # test mesh attr exists
        self.failUnlessRaises(presets.PresetException,
                              THREEDL_HELPER.check_preset,
                              preset
                              )
        preset[MESH] = True
        # test preset is ok
        THREEDL_HELPER.check_preset(preset)
        # test ranges are int
        outlutfile = os.path.join(self.tmp_dir, "test.3dl")
        self.failUnlessRaises(PresetException,
                              THREEDL_HELPER.write_3d_lut,
                              self.processor_3d.applyRGB,
                              outlutfile,
                              preset)
Test 3dl preset
dataset/ETHPy150Open mikrosimage/ColorPipe-tools/test/abstract_lut_test.py/AbstractLUTTest.test_3dl_preset