11 'label_text' : 'Option Menu:',
12 'items' : ('Chips', 'Lollies', 'Junk', 'More junk'),
16 (c.pack, (), {'padx' : 10, 'pady' : 10, 'fill' : 'both', 'expand' : 1}),
17 (Test.num_options, (), 6),
18 (c.getcurselection, (), 'Lollies'),
20 (c.index, 'Nowhere', 'ValueError: bad index "Nowhere": must be ' +
21 'a name, a number, Pmw.END or Pmw.SELECT'),
22 (c.index, Pmw.END, 3),
23 (c.index, Pmw.SELECT, 1),
26 (c.getcurselection, (), 'Chips'),
27 ('command', Test.callback1),
28 (c.invoke, (), 'Chips'),
29 (c.invoke, 'Lollies', 'Lollies'),
30 (c.getcurselection, (), 'Lollies'),
31 ('hull_background', 'yellow'),
32 ('hull_show', 'X', 'TclError: unknown option "-show"'),
33 (c.index, Pmw.SELECT, 1),
34 (c.setitems, (('Chips', 'Junk', 'Lollies', 'More junk'),)),
35 (c.index, Pmw.SELECT, 2),
36 (c.setitems, (('Fruit', 'Vegetables', 'Cereals', 'Legumes'),)),
37 (c.index, Pmw.SELECT, 0),
38 (c.getcurselection, (), 'Fruit'),
39 (c.setitems, (('Vegetables', 'Cereals', 'Legumes'), Pmw.END)),
40 (c.getcurselection, (), 'Legumes'),
41 (c.index, 'Vegetables', 0),
42 (c.invoke, 'Legumes', 'Legumes'),
43 ('hull_cursor', 'gumby'),
44 ('label_foreground', 'Green'),
45 ('label_foreground', 'Black'),
46 ('label_highlightcolor', 'Red'),
47 ('label_text', 'Label'),
50 testData = ((c, ((tests_1, kw_1),)),)
52 if __name__ == '__main__':
53 Test.runTests(testData)