testinggtk r114 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r114 - trunk/tests
- Date: Sun, 8 Jun 2008 21:25:25 +0000 (UTC)
Author: bjornl
Date: Sun Jun 8 21:25:25 2008
New Revision: 114
URL: http://svn.gnome.org/viewvc/testinggtk?rev=114&view=rev
Log:
Test for removing current page
Modified:
trunk/tests/test_notebook.py
Modified: trunk/tests/test_notebook.py
==============================================================================
--- trunk/tests/test_notebook.py (original)
+++ trunk/tests/test_notebook.py Sun Jun 8 21:25:25 2008
@@ -102,3 +102,19 @@
win.show_all()
assert notebook.window and win.window
assert notebook.window is win.window
+
+def test_remove_current_page():
+ '''
+ Ensure that page index is decreased by one when the current page
+ is removed, unless it is 0.
+ '''
+ book = gtk.Notebook()
+ for x in range(5):
+ page = gtk.Label()
+ page.show()
+ book.append_page(page, gtk.Label())
+
+ for x in range(4, 0, -1):
+ book.set_current_page(x)
+ book.remove_page(x)
+ assert book.get_current_page() == x - 1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]