[gnome-weather] tests: always enable accessibility before dogtail imports



commit fb691df3ec584ca1de6c95b3b31cfb7863ad4823
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Tue Feb 25 14:46:58 2014 +0100

    tests: always enable accessibility before dogtail imports
    
    https://bugzilla.gnome.org/show_bug.cgi?id=725152

 tests/testutil.py   |    5 +++++
 tests/world_view.py |    3 ++-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/tests/testutil.py b/tests/testutil.py
index 2f6d347..65f13ec 100644
--- a/tests/testutil.py
+++ b/tests/testutil.py
@@ -1,6 +1,11 @@
 # -*- mode: python -*-
 
 from gi.repository import GLib, Gio
+
+from dogtail.utils import isA11yEnabled, enableA11y
+if not isA11yEnabled():
+    enableA11y(True)
+
 from dogtail import tree
 from dogtail import utils
 from dogtail.predicate import *
diff --git a/tests/world_view.py b/tests/world_view.py
index b27b5b1..473b572 100755
--- a/tests/world_view.py
+++ b/tests/world_view.py
@@ -1,5 +1,7 @@
 #! /usr/bin/python
 
+from testutil import *
+
 from gi.repository import Gio, GLib
 
 import os, sys
@@ -7,7 +9,6 @@ import pyatspi
 from dogtail import tree
 from dogtail import utils
 from dogtail.procedural import *
-from testutil import *
 
 def active(widget):
     return widget.getState().contains(pyatspi.STATE_ARMED)


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