1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
import Tkinter
import Test
import Pmw
Test.initialise()
c = Pmw.SelectionDialog
kw_1 = {
'scrolledlist_labelpos': 'n',
'label_text' : 'Please select one',
'buttons' : ('OK', 'Cancel'),
'buttonbox_padx': 30,
}
tests_1 = (
(Test.num_options, (), 9),
('hull_background', '#d9d9d9'),
(c.insert, ('end', 'Calling', 'all', 'cars')),
('label_bitmap', 'warning'),
('hull_cursor', 'gumby'),
('label_image', Test.flagup),
('listbox_font', Test.font['variable']),
('listbox_foreground', 'red'),
('listbox_selectmode', 'multiple'),
('label_image', ''),
('label_bitmap', ''),
(c.title, 'SelectionDialog 1: new title', ''),
(c.interior, (), Tkinter.Frame),
('defaultbutton', 'OK'),
)
kw_2 = {
'buttons' : ('OK', 'Cancel'),
'buttonboxpos': 'e',
'scrolledlist_labelpos': 'n',
}
tests_2 = (
(c.title, 'SelectionDialog 2', ''),
)
alltests = (
(tests_1, kw_1),
(tests_2, kw_2),
)
testData = ((c, alltests),)
if __name__ == '__main__':
Test.runTests(testData)
|