@@ -0,0 +1,1306 @@
+import unittest%0A%0Afrom enable.testing import EnableTestAssistant%0Afrom enable.window import Window%0A%0Afrom ensemble.ctf.editor import CtfEditor%0A%0A%0Adef get_color(starting_color=None):%0A    if starting_color:%0A        return starting_color%0A    return (0.0, 1.0, 0.0)%0A%0A%0Adef get_filename(action='save'):%0A    return 'temp.json'%0A%0A%0Aclass TestCtfEditor(EnableTestAssistant, unittest.TestCase):%0A%0A    def setUp(self):%0A        tool = CtfEditor(bounds=(400, 100),%0A                         prompt_color_selection=get_color,%0A                         prompt_file_selection=get_filename)%0A        tool.add_function_node(tool.opacities, (0.5, 0.5))%0A        tool.add_function_node(tool.colors, (0.25, 1.0, 0.0, 0.0))%0A        self.tool = tool%0A        self.window = Window(None, size=(100, 100), component=tool)%0A        self.window.control.show()%0A%0A    def test_mouse_drag_alpha(self):%0A        tool = self.tool%0A        self.press_move_release(tool, %5B(50, 50), (51, 50), (52, 50),%0A                                       (53, 50), (54, 50), (55, 50)%5D,%0A                                window=self.window)%0A%0A    def test_mouse_drag_color(self):%0A        tool = self.tool%0A        self.press_move_release(tool, %5B(25, 10), (25, 10), (40, 10)%5D,%0A                                window=self.window)%0A%0Aif __name__ == '__main__':%0A    unittest.main()%0A

Add some unit tests for CtfEditor