testinggtk r450 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r450 - trunk/tests
- Date: Wed, 10 Sep 2008 20:59:43 +0000 (UTC)
Author: bjornl
Date: Wed Sep 10 20:59:43 2008
New Revision: 450
URL: http://svn.gnome.org/viewvc/testinggtk?rev=450&view=rev
Log:
Basic test for gtk.Box.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 20:59:43 2008
@@ -46,3 +46,17 @@
'''
box = gtk.HBox()
box.reorder_child(gtk.Label(), -1)
+
+def test_reorder_child():
+ '''
+ Ensure that reorder_child() reorders the widget in the box.
+ '''
+ box = gtk.HBox()
+ w1 = gtk.Button()
+ w2 = gtk.Label()
+ box.add(w1)
+ box.add(w2)
+
+ assert box.get_children() == [w1, w2]
+ box.reorder_child(w2, 0)
+ assert box.get_children() == [w2, w1]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]