@@ -0,0 +1,978 @@
+#!/usr/bin/env python2%0A%0Aimport sys%0Aimport os%0Aimport signal%0Aimport time%0Aimport dogtail%0Afrom dogtail.utils import run%0Afrom dogtail.config import config%0Afrom dogtail.procedural import focus, click%0Aimport unittest%0A%0A%0Aclass WindowTest(unittest.TestCase):%0A    def setUp(self):%0A        config.logDebugToStdOut = True%0A        config.logDebugToFile = False%0A        # Next line may take some time to run - about 40 sec.%0A        self.pid = run('./coala-gui')%0A        self.app = dogtail.tree.root.application('coala-gui')%0A%0A    def test_focus_app(self):%0A        focus.application.node = None%0A        focus.application('coala-gui')%0A        self.assertEquals(focus.application.node, self.app)%0A%0A    def tearDown(self):%0A        os.kill(self.pid, signal.SIGKILL)%0A        # Sleep just enough to let the app actually die.%0A        # AT-SPI doesn't like being given things too fast.%0A        print(%22Tearing down ...%22)%0A        time.sleep(0.5)%0A%0A%0Aif __name__ == '__main__':%0A    unittest.main(verbosity=2)%0A

Add WindowTest