testinggtk r451 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r451 - trunk/tests
- Date: Wed, 10 Sep 2008 21:09:49 +0000 (UTC)
Author: bjornl
Date: Wed Sep 10 21:09:48 2008
New Revision: 451
URL: http://svn.gnome.org/viewvc/testinggtk?rev=451&view=rev
Log:
tc to ensure that a correct child-notify signal is emitted on reorder_child()
Modified:
trunk/tests/test_box.py
Modified: trunk/tests/test_box.py
==============================================================================
--- trunk/tests/test_box.py (original)
+++ trunk/tests/test_box.py Wed Sep 10 21:09:48 2008
@@ -60,3 +60,22 @@
assert box.get_children() == [w1, w2]
box.reorder_child(w2, 0)
assert box.get_children() == [w2, w1]
+
+def test_reorder_child_emits_child_notify():
+ '''
+ Ensure that ``gtk.Box.reorder_child`` emits the child-notify
+ signal for the ``position`` property.
+ '''
+ box = gtk.HBox()
+ w1 = gtk.Button()
+ w2 = gtk.Label()
+ box.add(w1)
+ box.add(w2)
+
+ prop_name = [False]
+ def child_notify_cb(widget, param):
+ prop_name[0] = param.name
+ w2.connect('child-notify', child_notify_cb)
+
+ box.reorder_child(w2, 0)
+ assert prop_name[0] == 'position'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]