Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v8plus / lib / python2.4 / site-packages / Pmw / Pmw_1_2 / tests / TextDialog_test.py
CommitLineData
920dae64
AT
1import Tkinter
2import Test
3import Pmw
4
5Test.initialise()
6
7c = Pmw.TextDialog
8
9kw_1 = {
10 'scrolledtext_labelpos': 'n',
11 'label_text' : 'Here is the news',
12 'buttons' : ('OK', 'Cancel'),
13 'buttonbox_padx': 30,
14}
15tests_1 = (
16 (Test.num_options, (), 11),
17 ('text_wrap', 'none'),
18 ('text_state', 'disabled'),
19 ('hull_background', '#d9d9d9'),
20 ('label_bitmap', 'warning'),
21 ('hull_cursor', 'gumby'),
22 ('label_image', Test.flagup),
23 ('text_font', Test.font['variable']),
24 ('text_foreground', 'red'),
25 ('text_padx', 15),
26 ('text_pady', 15),
27 ('label_image', ''),
28 ('label_bitmap', ''),
29 (c.title, 'TextDialog 1: new title', ''),
30 (c.interior, (), Tkinter.Frame),
31 ('defaultbutton', 'OK'),
32 (c.clear, ()),
33 (c.get, (), '\n'),
34)
35
36kw_2 = {
37 'buttons' : ('OK', 'Cancel'),
38 'buttonboxpos': 'e',
39 'scrolledtext_labelpos': 'n',
40}
41tests_2 = (
42 (c.title, 'TextDialog 2', ''),
43)
44
45alltests = (
46 (tests_1, kw_1),
47 (tests_2, kw_2),
48)
49
50testData = ((c, alltests),)
51
52if __name__ == '__main__':
53 Test.runTests(testData)