summaryrefslogtreecommitdiff
path: root/tests/testhelpermodule.c
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2011-07-22 11:20:09 -0400
committerJohn (J5) Palmieri <johnp@redhat.com>2011-08-11 08:35:00 -0400
commitb8700451acd4a19b59b64fc8641fca748d2189e2 (patch)
treeeed5041e3a6e994adf4a7e7051286aeb941bb87c /tests/testhelpermodule.c
parentc980dae21468fe073cc8782608148c346bb90ad7 (diff)
downloadpygobject-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/testhelpermodule.c')
-rw-r--r--tests/testhelpermodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/testhelpermodule.c b/tests/testhelpermodule.c
index 4d1b44d0..b242a34e 100644
--- a/tests/testhelpermodule.c
+++ b/tests/testhelpermodule.c
@@ -531,7 +531,7 @@ PYGLIB_MODULE_START(testhelper, "testhelper")
d = PyModule_GetDict(module);
- if ((m = PyImport_ImportModule("gobject")) != NULL) {
+ if ((m = PyImport_ImportModule("gi._gobject")) != NULL) {
PyObject *moddict = PyModule_GetDict(m);
_PyGObject_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "GObject");