File: ScrolledField_test.py

package info (click to toggle)
python-pmw 1.2-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,024 kB
  • ctags: 3,802
  • sloc: python: 17,143; makefile: 41
file content (32 lines) | stat: -rw-r--r-- 652 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import Tkinter
import Test
import Pmw

Test.initialise()

c = Pmw.ScrolledField

kw_1 = {'labelpos': 'nw'}
tests_1 = (
  (c.pack, (), {'padx' : 10, 'pady' : 10, 'fill' : 'both', 'expand' : 1}),
  (Test.num_options, (), 4),
  ('text', 'Hello World'),
  ('label_textvariable', Test.stringvar),
  ('label_textvariable', ''),
  ('label_text', 'Label'),
  ('label_font', Test.font['small']),
  ('label_image', Test.flagup),
  ('label_image', ''),
  ('entry_foreground', 'red'),
  ('text', 'Foo'),
  ('entry_font', Test.font['small']),
)

alltests = (
  (tests_1, kw_1),
)

testData = ((c, alltests),)

if __name__ == '__main__':
    Test.runTests(testData)