[pygobject] tests: Consistently use GLib.MainLoop
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] tests: Consistently use GLib.MainLoop
- Date: Fri, 19 Oct 2012 08:05:11 +0000 (UTC)
commit 1ff04e846d50b948df6fa3260c548ef4f4779c58
Author: Martin Pitt <martinpitt gnome org>
Date: Fri Oct 19 09:05:01 2012 +0200
tests: Consistently use GLib.MainLoop
... instead of mixing GObject.MainLoop and GLib.MainLoop.
tests/test_everything.py | 4 ++--
tests/test_gdbus.py | 11 +++++------
2 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/tests/test_everything.py b/tests/test_everything.py
index 600edbf..4c4535f 100644
--- a/tests/test_everything.py
+++ b/tests/test_everything.py
@@ -287,7 +287,7 @@ class TestNullableArgs(unittest.TestCase):
@unittest.skipUnless(has_cairo, 'built without cairo support')
class TestCallbacks(unittest.TestCase):
called = False
- main_loop = GObject.MainLoop()
+ main_loop = GLib.MainLoop()
def test_callback(self):
TestCallbacks.called = False
@@ -398,7 +398,7 @@ class TestCallbacks(unittest.TestCase):
def test_async_ready_callback(self):
TestCallbacks.called = False
- TestCallbacks.main_loop = GObject.MainLoop()
+ TestCallbacks.main_loop = GLib.MainLoop()
def callback(obj, result, user_data):
TestCallbacks.main_loop.quit()
diff --git a/tests/test_gdbus.py b/tests/test_gdbus.py
index b129419..bb5f2d9 100644
--- a/tests/test_gdbus.py
+++ b/tests/test_gdbus.py
@@ -3,7 +3,6 @@
import unittest
-from gi.repository import GObject
from gi.repository import GLib
from gi.repository import Gio
@@ -68,7 +67,7 @@ class TestGDBusClient(unittest.TestCase):
finally:
user_data['main_loop'].quit()
- main_loop = GObject.MainLoop()
+ main_loop = GLib.MainLoop()
data = {'main_loop': main_loop}
self.dbus_proxy.call('ListNames', None,
Gio.DBusCallFlags.NO_AUTO_START, 500, None,
@@ -90,7 +89,7 @@ class TestGDBusClient(unittest.TestCase):
finally:
user_data['main_loop'].quit()
- main_loop = GObject.MainLoop()
+ main_loop = GLib.MainLoop()
data = {'main_loop': main_loop}
self.dbus_proxy.call('UnknownMethod', None,
Gio.DBusCallFlags.NO_AUTO_START, 500, None,
@@ -162,7 +161,7 @@ class TestGDBusClient(unittest.TestCase):
user_data['result'] = result
user_data['main_loop'].quit()
- main_loop = GObject.MainLoop()
+ main_loop = GLib.MainLoop()
data = {'main_loop': main_loop}
self.dbus_proxy.ListNames('()', result_handler=call_done, user_data=data)
main_loop.run()
@@ -178,7 +177,7 @@ class TestGDBusClient(unittest.TestCase):
user_data['result'] = result
user_data['main_loop'].quit()
- main_loop = GObject.MainLoop()
+ main_loop = GLib.MainLoop()
data = {'main_loop': main_loop}
self.dbus_proxy.ListNames('(s)', 'invalid_argument',
result_handler=call_done, user_data=data)
@@ -197,7 +196,7 @@ class TestGDBusClient(unittest.TestCase):
user_data['error'] = error
user_data['main_loop'].quit()
- main_loop = GObject.MainLoop()
+ main_loop = GLib.MainLoop()
data = {'main_loop': main_loop}
self.dbus_proxy.ListNames('(s)', 'invalid_argument',
result_handler=call_done,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]