From 5bef5a82d25dd29429eb6c2b146e40dc7d34e34f Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Sat, 15 Jun 2013 23:51:31 +0200 Subject: [PATCH] Set the AT_SPI_CLIENT variable in the tests This ensures the test itself is not recognized as a client by the registry. I'm not sure how that happens since we are not loading gtk, but it does. Not being a real gtk client with a mainloop we wasn't answering dbus calls and causing the registry to hang and fail. --- src/sugar3/test/unittest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sugar3/test/unittest.py b/src/sugar3/test/unittest.py index 9d70b967..ea891064 100644 --- a/src/sugar3/test/unittest.py +++ b/src/sugar3/test/unittest.py @@ -35,10 +35,14 @@ class UITestCase(unittest.TestCase): self._orig_level = logger.getEffectiveLevel() logger.setLevel(logging.DEBUG) + os.environ["AT_SPI_CLIENT"] = "yes" + def tearDown(self): logger = logging.getLogger() logger.setLevel(self._orig_level) + del os.environ["AT_SPI_CLIENT"] + @contextmanager def run_view(self, name): view_path = os.path.join("views", "%s.py" % name)