testinggtk r207 - trunk/tests



Author: bjornl
Date: Sat Jun 21 18:01:09 2008
New Revision: 207
URL: http://svn.gnome.org/viewvc/testinggtk?rev=207&view=rev

Log:
Test that checks that get_displayed_row() is updated correctly

Modified:
   trunk/tests/test_combobox.py

Modified: trunk/tests/test_combobox.py
==============================================================================
--- trunk/tests/test_combobox.py	(original)
+++ trunk/tests/test_combobox.py	Sat Jun 21 18:01:09 2008
@@ -106,3 +106,18 @@
     children = combo.get_children()
     assert len(children) == 1
     assert isinstance(children[0], gtk.CellView)
+
+def test_set_active_changes_displayed_row_in_cell_view():
+    '''
+    Ensure that the displayed row attribute in the ``gtk.CellView`` in
+    the ``gtk.ComboBox`` is updated when the active row is changed.
+    '''
+    combo = gtk.combo_box_new_text()
+    for x in range(10):
+        combo.append_text('%s' % x)
+    cellview = combo.get_children()[0]
+
+    assert not cellview.get_displayed_row()
+    for active in range(10):
+        combo.set_active(active)
+        assert cellview.get_displayed_row() == (active,)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]