After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 636589 - pygtk-2.22.0 fails to run tests
pygtk-2.22.0 fails to run tests
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: general
2.22.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
: 616130 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-12-06 12:00 UTC by Pacho Ramos
Modified: 2011-02-07 18:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix tests (7.83 KB, patch)
2011-02-07 11:48 UTC, Dieter Verfaillie
committed Details | Review

Description Pacho Ramos 2010-12-06 12:00:11 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):
  • File "./runtests.py", line 41 in <module>
    suite.addTest(loader.loadTestsFromName(name))
  • File "/usr/lib64/python2.6/unittest.py", line 576 in loadTestsFromName
    module = __import__('.'.join(parts_copy))
  • File "/home/pacho/pygtk-2.22.0/tests/test_enum.py", line 9 in <module>
    class PObject(gobject.GObject):
  • File "/home/pacho/pygtk-2.22.0/tests/test_enum.py", line 10 in PObject
    enum = gobject.property(type=gtk.WindowType, default=gtk.WINDOW_TOPLEVEL)
  • File "/usr/lib64/python2.6/site-packages/gtk-2.0/gobject/propertyhelper.py", line 112 in __init__
    self.type = self._type_from_python(type)
  • File "/usr/lib64/python2.6/site-packages/gtk-2.0/gobject/propertyhelper.py", line 202 in _type_from_python
    raise TypeError("Unsupported type: %r" % (type,))
TypeError: Unsupported type: <class 'gtk._gtk.WindowType'>
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
Comment 1 Pacho Ramos 2010-12-29 20:38:56 UTC
Any idea about what could be causing this test failure? Thanks
Comment 2 Tomeu Vizoso 2011-01-03 10:06:15 UTC
May be because of https://bugzilla.gnome.org/show_bug.cgi?id=626536 ?
Comment 3 Pacho Ramos 2011-01-10 13:42:05 UTC
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?)
Comment 4 Gilles Dartiguelongue 2011-01-20 10:50:48 UTC
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
Comment 5 Tomeu Vizoso 2011-02-07 11:00:57 UTC
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.
Comment 6 Dieter Verfaillie 2011-02-07 11:48:21 UTC
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).
Comment 7 Pacho Ramos 2011-02-07 11:55:30 UTC
If the patch is solving this regenerating a circular dependency between pygtk and pygobject, it doesn't look the way to go for me :-/
Comment 8 Martin Pitt 2011-02-07 12:18:36 UTC
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):
  • File "/home/martin/upstream/pygtk/tests/test_gdkevent.py", line 28 in testEventTime
    self.assert_(event.time == -0x80000000)
AssertionError: False is not true

======================================================================
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
Comment 9 Dieter Verfaillie 2011-02-07 12:54:00 UTC
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.
Comment 10 Pacho Ramos 2011-02-07 13:06:53 UTC
In that case I am happy with the changes, I misunderstood them, sorry

Thanks a lot :-)
Comment 11 Dieter Verfaillie 2011-02-07 18:41:59 UTC
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.
Comment 12 Dieter Verfaillie 2011-02-07 18:51:37 UTC
*** Bug 616130 has been marked as a duplicate of this bug. ***