1# Based on iwidgets2.2.0/tests/messagedialog.test code.
2
3import tkinter
4import Test
5import Pmw
6
7Test.initialise()
8
9Pmw.aboutversion('2.0')
10Pmw.aboutcopyright('Copyright Really Good Software')
11Pmw.aboutcontact('For information about this application contact\nyour' +
12        'system administrator')
13
14c = Pmw.AboutDialog
15
16kw_1 = {
17    'applicationname' : 'Really Good Application',
18    'buttonbox_padx': 30,
19}
20tests_1 = (
21  (Test.num_options, (), 14),
22  ('message_anchor', 'center'),
23  ('message_justify', 'center'),
24  ('message_wraplength', 0),
25  ('hull_background', '#d9d9d9'),
26  ('icon_bitmap', 'warning'),
27  ('hull_cursor', 'gumby'),
28  ('icon_image', Test.flagup),
29  ('message_font', Test.font['variable']),
30  ('message_foreground', 'red'),
31  ('message_padx', 15),
32  ('message_pady', 15),
33  ('icon_image', ''),
34  (c.title, 'AboutDialog 1: new title', ''),
35  (c.interior, (), tkinter.Frame),
36  (Pmw.aboutcontact, ''),
37)
38
39kw_2 = {
40    'applicationname' : 'Another Really Good Application',
41    'buttonboxpos': 'e',
42    'iconpos': 'n',
43    'borderx': 15,
44    'bordery': 15,
45    'separatorwidth': 5,
46}
47tests_2 = (
48  (c.title, 'AboutDialog 2', ''),
49)
50
51alltests = (
52  (tests_1, kw_1),
53  (tests_2, kw_2),
54)
55
56testData = ((c, alltests),)
57if __name__ == '__main__':
58    Test.runTests(testData)
59