diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2011-07-22 11:20:09 -0400 |
---|---|---|
committer | John (J5) Palmieri <johnp@redhat.com> | 2011-08-11 08:35:00 -0400 |
commit | b8700451acd4a19b59b64fc8641fca748d2189e2 (patch) | |
tree | eed5041e3a6e994adf4a7e7051286aeb941bb87c /tests/test_mainloop.py | |
parent | c980dae21468fe073cc8782608148c346bb90ad7 (diff) | |
download | pygobject-b8700451acd4a19b59b64fc8641fca748d2189e2.tar.gz |
refactor tests to only use PyGObject 3 syntax
* for PyGObject 3 we want to discourage the use of legacy
interfaces
* Using interfaces like from gi.repository import GObject makes
sure that the internal _gobject module is loaded and not
PyGObject 2's gobject module which would cause the application
to not work correctly
https://bugzilla.gnome.org/show_bug.cgi?id=642048
Diffstat (limited to 'tests/test_mainloop.py')
-rw-r--r-- | tests/test_mainloop.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_mainloop.py b/tests/test_mainloop.py index 80e2aec0..9ca5727b 100644 --- a/tests/test_mainloop.py +++ b/tests/test_mainloop.py @@ -6,6 +6,7 @@ import select import unittest import glib +from gi.repository import GObject from compathelper import _bytes @@ -24,7 +25,7 @@ class TestMainLoop(unittest.TestCase): loop.quit() raise Exception("deadbabe") - loop = glib.MainLoop() + loop = GObject.MainLoop() glib.child_watch_add(pid, child_died, loop) os.close(pipe_r) |