Move setting AT_SPI_CLIENT to discover

It needs to be called as early as possible before unit tests
has a chance to import gtk.

Hopefully will fix random test failures we are seeing in buildbot.
This commit is contained in:
Daniel Narvaez 2013-06-22 12:09:17 +02:00
parent 6d319619f0
commit f54229efd2
2 changed files with 1 additions and 4 deletions

View File

@ -37,6 +37,7 @@ def main():
os.chdir(args.tests_dir)
os.environ["TMPDIR"] = temp_dir
os.environ["AT_SPI_CLIENT"] = "yes"
try:
test = unittest.defaultTestLoader.discover(".")

View File

@ -35,14 +35,10 @@ 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)