testinggtk r299 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r299 - trunk/tests
- Date: Sat, 28 Jun 2008 13:15:58 +0000 (UTC)
Author: bjornl
Date: Sat Jun 28 13:15:58 2008
New Revision: 299
URL: http://svn.gnome.org/viewvc/testinggtk?rev=299&view=rev
Log:
Test for missing action attribute
Modified:
trunk/tests/test_uimanager.py
Modified: trunk/tests/test_uimanager.py
==============================================================================
--- trunk/tests/test_uimanager.py (original)
+++ trunk/tests/test_uimanager.py Sat Jun 28 13:15:58 2008
@@ -46,3 +46,20 @@
ui = gtk.UIManager()
ui.add_ui_from_string(xml)
ui.get_widget('/ui/menubar')
+
+ utils pass_on_warnings
+def test_no_action_in_menu():
+ '''
+ Ensure that a ``GtkWarning`` is printed if the UI string for a
+ menu does not have an action attribute.
+ '''
+ xml = '''
+ <ui>
+ <menubar>
+ <menu name = "FileMenu"/>
+ </menubar>
+ </ui>
+ '''
+ ui = gtk.UIManager()
+ ui.add_ui_from_string(xml)
+ ui.get_widget('/ui/menubar')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]