GNOME Bugzilla – Bug 636589
pygtk-2.22.0 fails to run tests
Last modified: 2011-02-07 18:51:37 UTC
I get the following error when manually compiling: $ make check Making check in . make[1]: Entering directory `/home/pacho/pygtk-2.22.0' make[1]: Nothing to be done for `check-am'. make[1]: Leaving directory `/home/pacho/pygtk-2.22.0' Making check in gtk make[1]: Entering directory `/home/pacho/pygtk-2.22.0/gtk' make[1]: Nothing to be done for `check'. make[1]: Leaving directory `/home/pacho/pygtk-2.22.0/gtk' Making check in examples make[1]: Entering directory `/home/pacho/pygtk-2.22.0/examples' make[1]: Nothing to be done for `check'. make[1]: Leaving directory `/home/pacho/pygtk-2.22.0/examples' Making check in tests make[1]: Entering directory `/home/pacho/pygtk-2.22.0/tests' make check-local make[2]: Entering directory `/home/pacho/pygtk-2.22.0/tests' Gtk-Message: Failed to load module "gnomebreakpad": libgnomebreakpad.so: no se puede abrir el fichero del objeto compartido: No existe el fichero o el directorio Traceback (most recent call last):
+ Trace 225003
suite.addTest(loader.loadTestsFromName(name))
module = __import__('.'.join(parts_copy))
class PObject(gobject.GObject):
enum = gobject.property(type=gtk.WindowType, default=gtk.WINDOW_TOPLEVEL)
self.type = self._type_from_python(type)
raise TypeError("Unsupported type: %r" % (type,))
make[2]: *** [check-local] Error 1 make[2]: Leaving directory `/home/pacho/pygtk-2.22.0/tests' make[1]: *** [check-am] Error 2 make[1]: Leaving directory `/home/pacho/pygtk-2.22.0/tests' make: *** [check-recursive] Error 1 Thanks a lot for your help
Any idea about what could be causing this test failure? Thanks
May be because of https://bugzilla.gnome.org/show_bug.cgi?id=626536 ?
Is it a problem in test and not in pygtk? (I mean, can we provide pygtk-2.22 since the problem is not caused by pygtk failing to work properly but a test problem?)
For the record, we went ahead like some other distros did disabling the tests that failed, see patch [1] Please update us if you want us to run some other tests. [1] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-python/pygtk/files/pygtk-2.22.0-disable-broken-tests.patch?view=markup
AFAICS, someone pushed tests to pygtk that used some functionality which didn't made into pygobject (or was reverted at some point). I would remove those tests for now and enter bug(s) if that functionality is still requested.
Created attachment 180284 [details] [review] Fix tests Thank you Tomeu, that is indeed the case. The attached patch reverts commit 48f0a43f2faffee931ba419dac2687a93344bf5a. Tested on my Gentoo machine and it enables the tests to run just fine (except some PendingDeprecationWarnings when run from Python 2.7, but that is a different matter).
If the patch is solving this regenerating a circular dependency between pygtk and pygobject, it doesn't look the way to go for me :-/
Dieter, confirmed, with attached patch the result looks exactly like if I remove tests/test_enums.py. In other words, I get two failures, but the rest succeeds. ====================================================================== FAIL: testEventTime (test_gdkevent.TestGdkEvent) ---------------------------------------------------------------------- Traceback (most recent call last):
+ Trace 225874
self.assert_(event.time == -0x80000000)
====================================================================== FAIL: testSubclass (test_dialog.MessageDialogTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/martin/upstream/pygtk/tests/test_dialog.py", line 19, in testSubclass self.assertEqual(sub.__gtype__.name, 'GtkMessageDialog') AssertionError: 'test_dialog+sub' != 'GtkMessageDialog' ---------------------------------------------------------------------- Ran 103 tests in 0.288s
Martin: Thanks, if nobody objects I'll commit it then. Pacho: I don't think this reintroduces a circular dependency for pygobject on pygtk: The following commit removed tests depending on pygtk from pygobject: http://git.gnome.org/browse/pygobject/commit/?id=4cbd9941c5705970a9f7a429e236e1203d3155a1 The following commits added those offending tests to pygtk: http://git.gnome.org/browse/pygtk/commit/?id=48f0a43f2faffee931ba419dac2687a93344bf5a http://git.gnome.org/browse/pygtk/commit/?id=b7ac3513997ad7c561bb830341e96db1bc9d529a The first commit changed existing tests into something that now fails to run. The proposed patch simply reverts the files changed by that commit back to the original tests (for pygtk) and does not modify pygobject in any way. The second commit placed its files in pygtk's root source directory, so they are never even run as far as I can tell? The proposed patch does not touch these tests.
In that case I am happy with the changes, I misunderstood them, sorry Thanks a lot :-)
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
*** Bug 616130 has been marked as a duplicate of this bug. ***