Commit 1ff04e84 authored by Martin Pitt's avatar Martin Pitt
Browse files

tests: Consistently use GLib.MainLoop

... instead of mixing GObject.MainLoop and GLib.MainLoop.
parent ff7e7401
......@@ -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()
......
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment