testinggtk r228 - trunk/tests



Author: bjornl
Date: Sun Jun 22 08:22:07 2008
New Revision: 228
URL: http://svn.gnome.org/viewvc/testinggtk?rev=228&view=rev

Log:
test_delete_action_oob() and test_insert_action_text()

Modified:
   trunk/tests/test_entrycompletion.py

Modified: trunk/tests/test_entrycompletion.py
==============================================================================
--- trunk/tests/test_entrycompletion.py	(original)
+++ trunk/tests/test_entrycompletion.py	Sun Jun 22 08:22:07 2008
@@ -2,6 +2,7 @@
 Tests for the gtk.EntryCompletion class.
 '''
 import gtk
+import utils
 
 def test_default_attributes():
     ec = gtk.EntryCompletion()
@@ -13,3 +14,20 @@
     assert not ec.get_inline_completion()
     assert not ec.get_inline_selection()
     assert ec.get_text_column() == -1
+    assert ec.get_minimum_key_length() == 1
+
+def test_insert_action_text():
+    ec = gtk.EntryCompletion()
+    for x in range(10):
+        ec.insert_action_text(0, 'hi %d' % x)
+
+ utils pass_on_warnings
+def test_delete_action_oob():
+    '''
+    Ensure that a ``GtkWarning`` is printed when the action index to
+    delete is greater than the number of actions in the
+    ``gtk.EntryCompletion``.
+    '''
+    ec = gtk.EntryCompletion()
+    ec.delete_action(333)
+



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