pygtk r3001 - in trunk: . gtk tests
- From: paulp svn gnome org
- To: svn-commits-list gnome org
- Subject: pygtk r3001 - in trunk: . gtk tests
- Date: Thu, 26 Jun 2008 20:13:40 +0000 (UTC)
Author: paulp
Date: Thu Jun 26 20:13:40 2008
New Revision: 3001
URL: http://svn.gnome.org/viewvc/pygtk?rev=3001&view=rev
Log:
2008-06-26 Paul Pogonyshev <pogonyshev gmx net>
* gtk/gtk.override (_wrap_gtk_plug_new): Fix to work also with
integer 'socket_id' argument (bug #539365).
* tests/Makefile.am:
* tests/test_plug.py: New test file.
Added:
trunk/tests/test_plug.py
Modified:
trunk/ChangeLog
trunk/gtk/gtk.override
trunk/tests/Makefile.am
Modified: trunk/gtk/gtk.override
==============================================================================
--- trunk/gtk/gtk.override (original)
+++ trunk/gtk/gtk.override Thu Jun 26 20:13:40 2008
@@ -5497,17 +5497,13 @@
_wrap_gtk_plug_new(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "socket_id", "display", NULL };
- PyObject *py_socket_id = NULL;
gulong socket_id;
PyGObject *display = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!|O!:GtkPlug.__init__", kwlist,
- &PyLong_Type, &py_socket_id,
- &PyGdkDisplay_Type, &display))
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "k|O!:GtkPlug.__init__", kwlist,
+ &socket_id, &PyGdkDisplay_Type, &display))
return -1;
- socket_id = PyLong_AsUnsignedLong(py_socket_id);
-
pygobject_construct(self, NULL);
if (display)
Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am (original)
+++ trunk/tests/Makefile.am Thu Jun 26 20:13:40 2008
@@ -13,6 +13,7 @@
test_glade.py \
test_liststore.py
test_pango.py \
+ test_plug.py \
test_radiobutton.py \
test_style.py \
test_textview.py \
Added: trunk/tests/test_plug.py
==============================================================================
--- (empty file)
+++ trunk/tests/test_plug.py Thu Jun 26 20:13:40 2008
@@ -0,0 +1,13 @@
+import unittest
+
+from common import gtk
+
+class TextPlug(unittest.TestCase):
+
+ # Bug #539365. Just check that it doesn't raise anything.
+ def test_constructor_socket_id(self):
+ self.assert_(isinstance(gtk.Plug(0), gtk.Plug))
+ self.assert_(isinstance(gtk.Plug(0L), gtk.Plug))
+
+if __name__ == '__main__':
+ unittest.main()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]