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 709304 - tests/test_dialog.py fails: AssertionError: 'GtkMessageDialog' != 'SubDialog'
tests/test_dialog.py fails: AssertionError: 'GtkMessageDialog' != 'SubDialog'
Status: RESOLVED WONTFIX
Product: pygtk
Classification: Bindings
Component: gtk
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2013-10-02 19:02 UTC by Alexandre Rostovtsev
Modified: 2018-08-17 13:39 UTC
See Also:
GNOME target: ---
GNOME version: 3.7/3.8


Attachments
proposed patch (961 bytes, patch)
2013-10-02 19:05 UTC, Alexandre Rostovtsev
none Details | Review

Description Alexandre Rostovtsev 2013-10-02 19:02:28 UTC
(As reported downstream at https://bugs.gentoo.org/show_bug.cgi?id=486602)

The pygtk-2.24.0 test suite fails:

======================================================================
FAIL: testSubclass (test_dialog.MessageDialogTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  • File "/var/tmp/portage/dev-python/pygtk-2.24.0-r4/work/pygtk-2.24.0/tests/test_dialog.py", line 24 in testSubclass
    self.assertEqual(sub.__gtype__.name, 'SubDialog')
AssertionError: 'GtkMessageDialog' != 'SubDialog'


The offending code in test_dialog.py looks like this:

sub = type('sub', (gtk.MessageDialog,), {})
[...]
self.assertEqual(sub.__gtype__.name, 'GtkMessageDialog')

type('Sub', (gtk.MessageDialog,), {'__gtype_name__': 'SubDialog'})
self.assertEqual(sub.__gtype__.name, 'SubDialog')


Obviously, since the value of the second type() call does not get assigned to sub, we shouldn't expect sub.__gtype__ to equal the new gtype :)
Comment 1 Alexandre Rostovtsev 2013-10-02 19:03:36 UTC
(In reply to comment #0)
> Obviously, since the value of the second type() call does not get assigned to

sub, we shouldn't expect sub.__gtype__ to equal the new gtype :)
Comment 2 Alexandre Rostovtsev 2013-10-02 19:05:30 UTC
Created attachment 256315 [details] [review]
proposed patch
Comment 3 André Klapper 2018-08-17 13:39:46 UTC
pygtk is not under active development anymore and had its last code changes
in 2013. Its codebase has been archived:
https://gitlab.gnome.org/Archive/pygtk/commits/master

PyGObject at https://gitlab.gnome.org/GNOME/pygobject is its successor. See https://pygobject.readthedocs.io/en/latest/guide/porting.html for porting info.

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect
reality. Feel free to open a task in GNOME Gitlab if the issue described in this task still applies to a recent version of PyGObject. Thanks!