GNOME Bugzilla – Bug 709304
tests/test_dialog.py fails: AssertionError: 'GtkMessageDialog' != 'SubDialog'
Last modified: 2018-08-17 13:39:46 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):
+ Trace 232568
self.assertEqual(sub.__gtype__.name, '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 :)
(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 :)
Created attachment 256315 [details] [review] proposed patch
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!