testinggtk r212 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r212 - trunk/tests
- Date: Sat, 21 Jun 2008 19:35:57 +0000 (UTC)
Author: bjornl
Date: Sat Jun 21 19:35:57 2008
New Revision: 212
URL: http://svn.gnome.org/viewvc/testinggtk?rev=212&view=rev
Log:
Test for setting menu item without child as active. Remove debug print statements
Modified:
trunk/tests/test_menu.py
Modified: trunk/tests/test_menu.py
==============================================================================
--- trunk/tests/test_menu.py (original)
+++ trunk/tests/test_menu.py Sat Jun 21 19:35:57 2008
@@ -25,7 +25,19 @@
menu.append(item)
for idx, item in enumerate(items):
- print idx, item
menu.set_active(idx)
- print menu.get_active()
assert menu.get_active() == item
+
+def test_set_active_on_menu_item_without_child():
+ '''
+ Ensure that it is possible to set the active menu item to a menu
+ item without a child.
+
+ :bug: #539512
+ '''
+ # Default constructor creates a menu item without a child.
+ mi = gtk.MenuItem()
+ menu = gtk.Menu()
+ menu.append(mi)
+ menu.set_active(0)
+ assert menu.get_active() == 0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]