testinggtk r127 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r127 - trunk/tests
- Date: Sun, 15 Jun 2008 02:51:58 +0000 (UTC)
Author: bjornl
Date: Sun Jun 15 02:51:58 2008
New Revision: 127
URL: http://svn.gnome.org/viewvc/testinggtk?rev=127&view=rev
Log:
Test for checking TypeError from append
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 02:51:58 2008
@@ -28,6 +28,18 @@
liststore.connect('row-changed', row_changed_cb)
liststore.append(['foo'])
assert emitted[0]
+
+def test_adding_invalid_row():
+ '''
+ Ensure that a ``TypeError`` is raised when a row of the wrong type
+ is added to a ``gtk.ListStore``.
+ '''
+ store = gtk.ListStore(int)
+ try:
+ store.append(['foo'])
+ assert False
+ except TypeError:
+ assert True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]