testinggtk r125 - trunk/tests



Author: bjornl
Date: Sun Jun 15 02:29:12 2008
New Revision: 125
URL: http://svn.gnome.org/viewvc/testinggtk?rev=125&view=rev

Log:
Check defaults for row-span-column and column-span-column. New test for TypeErrors from set_active_iter(None).

Modified:
   trunk/tests/test_combobox.py

Modified: trunk/tests/test_combobox.py
==============================================================================
--- trunk/tests/test_combobox.py	(original)
+++ trunk/tests/test_combobox.py	Sun Jun 15 02:29:12 2008
@@ -9,6 +9,8 @@
     combo = gtk.ComboBox()
     assert combo.get_wrap_width() == 0
     assert combo.get_active() == -1
+    assert combo.get_row_span_column() == -1
+    assert combo.get_column_span_column() == -1
     assert not combo.get_active_iter()
     assert not combo.get_model()
     assert not combo.get_title()
@@ -58,3 +60,15 @@
         combo.append_text(str(x))
     combo.set_active(1)
     assert emitted[0]
+
+def test_set_none_active_iter():
+    '''
+    Ensure that a ``TypeError`` is raised if ``None`` is set as the
+    active iter.
+    '''
+    combo = gtk.ComboBox()
+    try:
+        combo.set_active_iter(None)
+        assert False
+    except TypeError:
+        assert True



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