testinggtk r136 - trunk/tests



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

Log:
Test for gtk.ListStore.clear

Modified:
   trunk/tests/test_liststore.py

Modified: trunk/tests/test_liststore.py
==============================================================================
--- trunk/tests/test_liststore.py	(original)
+++ trunk/tests/test_liststore.py	Sun Jun 15 13:02:02 2008
@@ -79,3 +79,13 @@
         cols = [int] * x
         store.set_column_types(*cols)
     
+def test_clear():
+    '''
+    Ensure that ``clear`` removes all items in ``gtk.ListStore``.
+    '''
+    store = gtk.ListStore(str)
+    for x in range(10):
+        store.append(['hi'])
+    assert len(store) == 10
+    store.clear()
+    assert len(store) == 0



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