]> SALOME platform Git repositories - tools/eficas.git/blob - Pmw/Pmw_1_2/tests/TextDialog_test.py
Salome HOME
Modif V6_4_°
[tools/eficas.git] / Pmw / Pmw_1_2 / tests / TextDialog_test.py
1 import Tkinter
2 import Test
3 import Pmw
4
5 Test.initialise()
6
7 c = Pmw.TextDialog
8
9 kw_1 = {
10     'scrolledtext_labelpos': 'n',
11     'label_text' : 'Here is the news',
12     'buttons' : ('OK', 'Cancel'),
13     'buttonbox_padx': 30,
14 }
15 tests_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
36 kw_2 = {
37     'buttons' : ('OK', 'Cancel'),
38     'buttonboxpos': 'e',
39     'scrolledtext_labelpos': 'n',
40 }
41 tests_2 = (
42   (c.title, 'TextDialog 2', ''),
43 )
44
45 alltests = (
46   (tests_1, kw_1),
47   (tests_2, kw_2),
48 )
49
50 testData = ((c, alltests),)
51
52 if __name__ == '__main__':
53     Test.runTests(testData)