1 # Based on iwidgets2.2.0/tests/promptdialog.test code.
12 'entryfield_labelpos': 'n',
13 'label_text' : 'Please enter your password',
14 'buttons' : ('OK', 'Cancel', 'Help'),
17 (Test.num_options, (), 11),
18 (c.title, 'PromptDialog 1', ''),
19 ('hull_background', '#d9d9d9'),
20 ('hull_cursor', 'gumby'),
21 ('entry_exportselection', 1),
22 ('entry_foreground', 'Black'),
23 ('entry_background', 'GhostWhite'),
24 ('entry_insertbackground', 'Black'),
25 ('entry_insertborderwidth', 1),
26 ('entry_insertborderwidth', 0),
27 ('entry_insertofftime', 400),
28 ('entry_insertontime', 700),
29 ('entry_insertwidth', 3),
30 ('label_text', 'Label'),
31 ('entry_justify', 'left'),
32 ('entry_relief', 'sunken'),
33 ('entry_state', 'disabled'),
34 ('entry_state', 'normal'),
35 ('entry_background', 'GhostWhite'),
36 ('entryfield_validate', 'numeric'),
37 ('entryfield_validate', 'alphabetic'),
38 ('entryfield_validate', 'alphanumeric'),
40 (c.interior, (), Tkinter.Frame),
41 (c.insertentry, ('end', 'Test String')),
42 (c.get, (), 'Test String'),
43 (c.deleteentry, (0, 'end')),
44 (c.insertentry, ('end', 'Another Test')),
46 (c.indexentry, 'end', 12),
47 (c.selection_from, 0),
48 (c.selection_to, 'end'),
52 ('label_bitmap', 'warning'),
53 ('label_image', Test.flagup),
54 ('entry_font', Test.font['variable']),
55 ('entry_foreground', 'red'),
58 (c.title, 'PromptDialog 1: new title', ''),
59 ('defaultbutton', 'OK'),
64 'entryfield_labelpos': 'w',
65 'label_text' : 'Please enter your password',
67 'buttons' : ('OK', 'Cancel'),
70 (c.title, 'PromptDialog 2', ''),
78 testData = ((c, alltests),)
80 if __name__ == '__main__':
81 Test.runTests(testData)