[pygobject/pygobject-3-8] testhelper: Fix import requirement for GObject



commit 075a11ad29f044950c6f60eb2ce617ee38bbfd3c
Author: Simon Feltman <sfeltman src gnome org>
Date:   Sat Jul 6 09:48:35 2013 -0700

    testhelper: Fix import requirement for GObject
    
    Replace the importing of gi._gobject._gobject with gi.repository.GObject
    in tests/testhelpermodule.c
    
    The testhelper module was only importing the static bindings
    (gi._gobject._gobject) and not the overrides (gi.repository.GObject).
    This was causing some tests to fail when test_thread was the first
    test to run in the suite due to it registering new types based on
    PyGObject_Type.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703647

 tests/testhelpermodule.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tests/testhelpermodule.c b/tests/testhelpermodule.c
index 516cb97..9b198c3 100644
--- a/tests/testhelpermodule.c
+++ b/tests/testhelpermodule.c
@@ -615,7 +615,7 @@ PYGLIB_MODULE_START(testhelper, "testhelper")
 
   d = PyModule_GetDict(module);
 
-  if ((m = PyImport_ImportModule("gi._gobject._gobject")) == NULL) {
+  if ((m = PyImport_ImportModule("gi.repository.GObject")) == NULL) {
     PyErr_SetString(PyExc_ImportError,
                    "could not import gobject");
     return PYGLIB_MODULE_ERROR_RETURN;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]