[pyatspi2] Test fixes
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pyatspi2] Test fixes
- Date: Tue, 29 Apr 2014 15:46:20 +0000 (UTC)
commit 48901e902966c9ebc5ceba4ae2503bcd90250fa2
Author: Patryk Kaczmarek <patryk k samsung com>
Date: Thu Apr 10 16:21:29 2014 +0200
Test fixes
* Tests can be lanuched
* Deprcated functions changed
tests/pyatspi/accessibletest.py | 2 +-
tests/pyatspi/actiontest.py | 2 +-
tests/pyatspi/collectiontest.py | 2 +-
tests/pyatspi/componenttest.py | 6 +++---
tests/pyatspi/desktoptest.py | 2 +-
tests/pyatspi/pasytest/Pasy.py | 6 +++---
tests/pyatspi/relationtest.py | 2 +-
tests/pyatspi/statetest.py | 2 +-
tests/pyatspi/testrunner.in | 4 ++--
9 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/tests/pyatspi/accessibletest.py b/tests/pyatspi/accessibletest.py
index 756460c..7772078 100644
--- a/tests/pyatspi/accessibletest.py
+++ b/tests/pyatspi/accessibletest.py
@@ -1,5 +1,5 @@
import dbus
-import gobject
+from gi.repository import GObject
import os.path
from xml.dom import minidom
diff --git a/tests/pyatspi/actiontest.py b/tests/pyatspi/actiontest.py
index cfdb36d..98479c8 100644
--- a/tests/pyatspi/actiontest.py
+++ b/tests/pyatspi/actiontest.py
@@ -1,5 +1,5 @@
import dbus
-import gobject
+from gi.repository import GObject
import os.path
from xml.dom import minidom
diff --git a/tests/pyatspi/collectiontest.py b/tests/pyatspi/collectiontest.py
index b15404f..2bb86e1 100644
--- a/tests/pyatspi/collectiontest.py
+++ b/tests/pyatspi/collectiontest.py
@@ -1,5 +1,5 @@
import dbus
-import gobject
+from gi.repository import GObject
import os.path
from xml.dom import minidom
diff --git a/tests/pyatspi/componenttest.py b/tests/pyatspi/componenttest.py
index f884028..cdd39c8 100644
--- a/tests/pyatspi/componenttest.py
+++ b/tests/pyatspi/componenttest.py
@@ -1,5 +1,5 @@
import dbus
-import gobject
+from gi.repository import GObject
import os.path
from xml.dom import minidom
@@ -8,8 +8,8 @@ import os
from pasytest import PasyTest as _PasyTest
import pyatspi
-from Accessibility import Component
-from Accessibility import BoundingBox
+from pyatspi.Accessibility import Component
+from pyatspi.utils import BoundingBox
ATSPI_LAYER_WIDGET = 3
ATSPI_LAYER_MDI = 4
diff --git a/tests/pyatspi/desktoptest.py b/tests/pyatspi/desktoptest.py
index 409f634..b237a58 100644
--- a/tests/pyatspi/desktoptest.py
+++ b/tests/pyatspi/desktoptest.py
@@ -1,5 +1,5 @@
import dbus
-import gobject
+from gi.repository import GObject
import os.path
from xml.dom import minidom
diff --git a/tests/pyatspi/pasytest/Pasy.py b/tests/pyatspi/pasytest/Pasy.py
index 372ce80..6c6c73f 100644
--- a/tests/pyatspi/pasytest/Pasy.py
+++ b/tests/pyatspi/pasytest/Pasy.py
@@ -13,7 +13,7 @@
#along with this program; if not, write to the Free Software
#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-import gobject
+from gi.repository import GObject, GLib
from Events import Events
import traceback
@@ -104,14 +104,14 @@ class PasyTest(PasyTestStep):
def entry(self):
self._iter = self._test_iterator()
- gobject.idle_add(self.idle_handler)
+ GLib.idle_add(self.idle_handler)
def idle_handler(self):
try:
step = self._iter.next()
def finished_handler():
if step.state == PASY_TEST_WIN or self._cont == True:
- gobject.idle_add(self.idle_handler)
+ GLib.idle_add(self.idle_handler)
elif step.state == PASY_TEST_FAIL and self._cont == False:
self.fail("Sub test %s Failed" % step._name)
step.events.finished += finished_handler
diff --git a/tests/pyatspi/relationtest.py b/tests/pyatspi/relationtest.py
index 47fb814..7981023 100644
--- a/tests/pyatspi/relationtest.py
+++ b/tests/pyatspi/relationtest.py
@@ -1,5 +1,5 @@
import dbus
-import gobject
+from gi.repository import GObject
import os.path
from xml.dom import minidom
diff --git a/tests/pyatspi/statetest.py b/tests/pyatspi/statetest.py
index 223cf6e..572ebb2 100644
--- a/tests/pyatspi/statetest.py
+++ b/tests/pyatspi/statetest.py
@@ -1,5 +1,5 @@
import dbus
-import gobject
+from gi.repository import GObject
import os.path
from xml.dom import minidom
diff --git a/tests/pyatspi/testrunner.in b/tests/pyatspi/testrunner.in
index f70a1d9..39cc7ff 100755
--- a/tests/pyatspi/testrunner.in
+++ b/tests/pyatspi/testrunner.in
@@ -1,6 +1,6 @@
#! PYTHON@
-import gobject
+from gi.repository import GObject, GLib
import dbus
import sys
import os
@@ -81,7 +81,7 @@ def main(argv):
test_object = test_class(bus, name)
test_object.run()
- loop = gobject.MainLoop()
+ loop = GLib.MainLoop()
def finished_handler():
loop.quit()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]