[gegl] tests: Check that gegl:color's format is introspectable



commit fbd9d8e999676bb9699765c794159a6a2bb71f8a
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Fri Oct 4 19:28:22 2013 -0700

    tests: Check that gegl:color's format is introspectable

 tests/python/test-gegl-format.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/tests/python/test-gegl-format.py b/tests/python/test-gegl-format.py
index 4ddee0b..b812a69 100755
--- a/tests/python/test-gegl-format.py
+++ b/tests/python/test-gegl-format.py
@@ -43,6 +43,17 @@ class TestGeglFormat(unittest.TestCase):
       self.assertEqual("RGB float", Gegl.format_get_name(buf_float.get_property("format")))
       self.assertEqual("RGBA u8", Gegl.format_get_name(buf_u8.get_property("format")))
 
+    def test_color_op(self):
+      node = Gegl.Node()
+      node.set_property("operation", "gegl:color")
+
+      node.set_property("format", Gegl.format("RGBA u8"))
+      self.assertEqual(Gegl.format("RGBA u8"), node.get_property("format"))
+      self.assertEqual("RGBA u8", Gegl.format_get_name(node.get_property("format")))
+
+      node.set_property("format", Gegl.format("RGBA float"))
+      self.assertEqual(Gegl.format("RGBA float"), node.get_property("format"))
+      self.assertEqual("RGBA float", Gegl.format_get_name(node.get_property("format")))
 
 if __name__ == '__main__':
     Gegl.init(None);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]