testinggtk r213 - trunk/tests



Author: bjornl
Date: Sat Jun 21 19:36:25 2008
New Revision: 213
URL: http://svn.gnome.org/viewvc/testinggtk?rev=213&view=rev

Log:
Test for creating a gtk.MenuItem using a label

Modified:
   trunk/tests/test_menuitem.py

Modified: trunk/tests/test_menuitem.py
==============================================================================
--- trunk/tests/test_menuitem.py	(original)
+++ trunk/tests/test_menuitem.py	Sat Jun 21 19:36:25 2008
@@ -8,6 +8,15 @@
     mi = gtk.MenuItem()
     assert not mi.get_submenu()
     assert not mi.get_right_justified()
+    assert not mi.get_child()
+
+def test_menu_item_with_label():
+    '''
+    Ensure that a ``gtk.MenuItem`` with a label has a
+    ``gtk.AccelLabel`` as the child.
+    '''
+    mi = gtk.MenuItem(label = 'hi')
+    assert isinstance(mi.get_child(), gtk.AccelLabel)
 
 @utils.fail_on_warnings
 def test_set_non_submenu():



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