Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | # Based on iwidgets2.2.0/tests/messagedialog.test code. |
2 | ||
3 | import Tkinter | |
4 | import Test | |
5 | import Pmw | |
6 | ||
7 | Test.initialise() | |
8 | ||
9 | Pmw.aboutversion('1.0') | |
10 | Pmw.aboutcopyright('Copyright Really Good Software') | |
11 | Pmw.aboutcontact('For information about this application contact\nyour' + | |
12 | 'system administrator') | |
13 | ||
14 | c = Pmw.AboutDialog | |
15 | ||
16 | kw_1 = { | |
17 | 'applicationname' : 'Really Good Application', | |
18 | 'buttonbox_padx': 30, | |
19 | } | |
20 | tests_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 | ||
39 | kw_2 = { | |
40 | 'applicationname' : 'Another Really Good Application', | |
41 | 'buttonboxpos': 'e', | |
42 | 'iconpos': 'n', | |
43 | 'borderx': 15, | |
44 | 'bordery': 15, | |
45 | 'separatorwidth': 5, | |
46 | } | |
47 | tests_2 = ( | |
48 | (c.title, 'AboutDialog 2', ''), | |
49 | ) | |
50 | ||
51 | alltests = ( | |
52 | (tests_1, kw_1), | |
53 | (tests_2, kw_2), | |
54 | ) | |
55 | ||
56 | testData = ((c, alltests),) | |
57 | ||
58 | if __name__ == '__main__': | |
59 | Test.runTests(testData) |