jan: thuban/test test_menu.py,1.3,1.4

cvs@intevation.de cvs at intevation.de
Wed May 12 22:50:35 CEST 2004


Author: jan

Update of /thubanrepository/thuban/test
In directory doto:/tmp/cvs-serv32298

Modified Files:
	test_menu.py 
Log Message:
(MenuTest.test): Added testing of method Menu.FindOrInsertMenu.


Index: test_menu.py
===================================================================
RCS file: /thubanrepository/thuban/test/test_menu.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- test_menu.py	27 May 2003 13:10:08 -0000	1.3
+++ test_menu.py	12 May 2004 20:50:33 -0000	1.4
@@ -96,6 +96,26 @@
         self.compare_menus(editmenu, Menu("edit", "Edit", edit_items[:]))
         editmenu.RemoveItem("copy")
         self.compare_menus(editmenu, Menu("edit", "Edit", ['cut', 'paste']))
+        editmenu.InsertItem("copy", after="cut") # for convenience for
+                                                 # the following tests
+
+        # find-or-insert a menu
+        self.compare_menus(menu, Menu("<main>", "<main>",
+                                      [Menu("file", "File", file_items[:]),
+                                       Menu("edit", "Edit", edit_items[:]),
+                                       Menu("help", "Help", help_items[:])]))
+        menu.FindOrInsertMenu("extensions", "Extensions")
+        self.compare_menus(menu, Menu("<main>", "<main>",
+                                      [Menu("file", "File", file_items[:]),
+                                       Menu("edit", "Edit", edit_items[:]),
+                                       Menu("help", "Help", help_items[:]),
+                                       Menu("extensions", "Extensions", [])]))
+        menu.FindOrInsertMenu("extensions", "Extensions")
+        self.compare_menus(menu, Menu("<main>", "<main>",
+                                      [Menu("file", "File", file_items[:]),
+                                       Menu("edit", "Edit", edit_items[:]),
+                                       Menu("help", "Help", help_items[:]),
+                                       Menu("extensions", "Extensions", [])]))
 
 
 if __name__ == "__main__":





More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)